analyzer warnings: assign [super init] to self and check for nil

This commit is contained in:
Stefan Csomor
2017-06-07 10:21:18 +02:00
parent c6ca6d922f
commit 4312de64c7
15 changed files with 165 additions and 121 deletions

View File

@@ -130,9 +130,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
- (id)init
{
self = [super init];
maxLength = 0;
forceUpper = false;
if ( self = [super init] )
{
maxLength = 0;
forceUpper = false;
}
return self;
}
@@ -495,8 +497,10 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
- (id) initWithFrame:(NSRect) frame
{
self = [super initWithFrame:frame];
fieldEditor = nil;
if ( self = [super initWithFrame:frame] )
{
fieldEditor = nil;
}
return self;
}