diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-25 16:19:46 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-25 16:19:46 +0000 |
commit | 1b83e14b1f5640881deeb03c1d11df5197746b64 (patch) | |
tree | 15459d01d836db14064f120fdd7a3ab38ef2e421 /tikzit/src/common/Node.m | |
parent | c0137b33c535eb04f5e7d5628e9a225e226c5b34 (diff) |
Fix issues found by the clang static analyzer
Diffstat (limited to 'tikzit/src/common/Node.m')
-rw-r--r-- | tikzit/src/common/Node.m | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tikzit/src/common/Node.m b/tikzit/src/common/Node.m index 7818a28..e564e5d 100644 --- a/tikzit/src/common/Node.m +++ b/tikzit/src/common/Node.m @@ -29,17 +29,18 @@ @implementation Node - (id)initWithPoint:(NSPoint)p { - [super init]; - data = [[GraphElementData alloc] init]; - style = nil; - label = @""; - point = p; + self = [super init]; + if (self) { + data = [[GraphElementData alloc] init]; + style = nil; + label = @""; + point = p; + } return self; } - (id)init { - [self initWithPoint:NSMakePoint(0.0f, 0.0f)]; - return self; + return [self initWithPoint:NSMakePoint(0.0f, 0.0f)]; } - (id)copyWithZone:(NSZone*)z { |