- int i = 0;
- bool isLeft = FALSE;
- if (attachment < (n+1))
- {
- i = attachment-1;
- isLeft = FALSE;
- }
- else
- {
- i = (totalNumberAttachments - attachment - 1);
- isLeft = TRUE;
- }
- wxNode *node = GetRegions().Item(i);
+ bool isLeft = !(attachment < (n+1));
+ int i = (isLeft) ? (totalNumberAttachments - attachment - 1) : (attachment-1);
+ wxObjectList::compatibility_iterator node = GetRegions().Item(i);