summaryrefslogtreecommitdiff
path: root/tikzit/src/common/CircleShape.m
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2013-03-25 16:19:46 +0000
committerAlex Merry <dev@randomguy3.me.uk>2013-03-25 16:19:46 +0000
commit1b83e14b1f5640881deeb03c1d11df5197746b64 (patch)
tree15459d01d836db14064f120fdd7a3ab38ef2e421 /tikzit/src/common/CircleShape.m
parentc0137b33c535eb04f5e7d5628e9a225e226c5b34 (diff)
Fix issues found by the clang static analyzer
Diffstat (limited to 'tikzit/src/common/CircleShape.m')
-rw-r--r--tikzit/src/common/CircleShape.m38
1 files changed, 19 insertions, 19 deletions
diff --git a/tikzit/src/common/CircleShape.m b/tikzit/src/common/CircleShape.m
index 954cff2..f2d1d52 100644
--- a/tikzit/src/common/CircleShape.m
+++ b/tikzit/src/common/CircleShape.m
@@ -28,26 +28,26 @@
@implementation CircleShape
- (id)init {
- [super init];
-
- Node *n0,*n1,*n2,*n3;
-
- n0 = [Node nodeWithPoint:NSMakePoint( 0.0f, 0.2f)];
- n1 = [Node nodeWithPoint:NSMakePoint( 0.2f, 0.0f)];
- n2 = [Node nodeWithPoint:NSMakePoint( 0.0f, -0.2f)];
- n3 = [Node nodeWithPoint:NSMakePoint(-0.2f, 0.0f)];
-
- Edge *e0,*e1,*e2,*e3;
-
- e0 = [Edge edgeWithSource:n0 andTarget:n1]; [e0 setBend:-45];
- e1 = [Edge edgeWithSource:n1 andTarget:n2]; [e1 setBend:-45];
- e2 = [Edge edgeWithSource:n2 andTarget:n3]; [e2 setBend:-45];
- e3 = [Edge edgeWithSource:n3 andTarget:n0]; [e3 setBend:-45];
-
- paths = [[NSSet alloc] initWithObjects:[NSArray arrayWithObjects:e0,e1,e2,e3,nil],nil];
+ self = [super init];
+ if (self) {
+ Node *n0,*n1,*n2,*n3;
+
+ n0 = [Node nodeWithPoint:NSMakePoint( 0.0f, 0.2f)];
+ n1 = [Node nodeWithPoint:NSMakePoint( 0.2f, 0.0f)];
+ n2 = [Node nodeWithPoint:NSMakePoint( 0.0f, -0.2f)];
+ n3 = [Node nodeWithPoint:NSMakePoint(-0.2f, 0.0f)];
+
+ Edge *e0,*e1,*e2,*e3;
+
+ e0 = [Edge edgeWithSource:n0 andTarget:n1]; [e0 setBend:-45];
+ e1 = [Edge edgeWithSource:n1 andTarget:n2]; [e1 setBend:-45];
+ e2 = [Edge edgeWithSource:n2 andTarget:n3]; [e2 setBend:-45];
+ e3 = [Edge edgeWithSource:n3 andTarget:n0]; [e3 setBend:-45];
+
+ paths = [[NSSet alloc] initWithObjects:[NSArray arrayWithObjects:e0,e1,e2,e3,nil],nil];
- styleTikz = @"circle";
-
+ styleTikz = @"circle";
+ }
return self;
}