]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/divided.cpp
reSWIGged
[wxWidgets.git] / contrib / src / ogl / divided.cpp
index 92448da7497981bb17a1946ae795e6d22f9c0285..41e62564d38d55bd0711adfbe41ca5f9ac8e83db 100644 (file)
@@ -243,18 +243,8 @@ bool wxDividedShape::GetAttachmentPosition(int attachment, double *x, double *y,
   // Left or right.
   else
   {
-    int i = 0;
-    bool isLeft = FALSE;
-    if (attachment < (n+1))
-    {
-      i = attachment-1;
-      isLeft = FALSE;
-    }
-    else
-    {
-      i = (totalNumberAttachments - attachment - 1);
-      isLeft = TRUE;
-    }
+    bool isLeft = !(attachment < (n+1));
+    int i = (isLeft) ? (totalNumberAttachments - attachment - 1) : (attachment-1);
     wxNode *node = GetRegions().Item(i);
     if (node)
     {