diff options
-rw-r--r-- | src/mac.m | 4 | ||||
-rw-r--r-- | src/win.c | 7 | ||||
-rw-r--r-- | src/x11.c | 4 |
3 files changed, 8 insertions, 7 deletions
@@ -1166,8 +1166,8 @@ puglGetAncestorCenter(const PuglView* const view) const NSRect boundsPx = nsRectFromPoints(view, boundsPt); const PuglPoint center = { - (PuglCoord)(boundsPx.origin.x + boundsPx.size.width / 2.0), - (PuglCoord)(boundsPx.origin.y + boundsPx.size.height / 2.0)}; + (PuglCoord)(boundsPx.origin.x + (boundsPx.size.width / 2.0)), + (PuglCoord)(boundsPx.origin.y + (boundsPx.size.height / 2.0))}; return center; } @@ -44,7 +44,8 @@ #ifdef __cplusplus # define PUGL_INIT_STRUCT \ - {} + { \ + } #else # define PUGL_INIT_STRUCT {0} #endif @@ -1581,8 +1582,8 @@ puglGetAncestorCenter(const PuglView* const view) &rect); const PuglPoint center = { - (PuglCoord)(rect.left + (rect.right - rect.left) / 2), - (PuglCoord)(rect.top + (rect.bottom - rect.top) / 2)}; + (PuglCoord)(rect.left + ((rect.right - rect.left) / 2)), + (PuglCoord)(rect.top + ((rect.bottom - rect.top) / 2))}; return center; } @@ -523,8 +523,8 @@ puglGetAncestorCenter(const PuglView* const view) &ancestorAttrs); const PuglPoint center = { - (PuglCoord)(ancestorAttrs.x + ancestorAttrs.width / 2), - (PuglCoord)(ancestorAttrs.y + ancestorAttrs.height / 2)}; + (PuglCoord)(ancestorAttrs.x + (ancestorAttrs.width / 2)), + (PuglCoord)(ancestorAttrs.y + (ancestorAttrs.height / 2))}; return center; } |