aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mac.m4
-rw-r--r--src/win.c7
-rw-r--r--src/x11.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/src/mac.m b/src/mac.m
index 74241d6..d5797c3 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -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;
}
diff --git a/src/win.c b/src/win.c
index 99f47fb..6be7e17 100644
--- a/src/win.c
+++ b/src/win.c
@@ -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;
}
diff --git a/src/x11.c b/src/x11.c
index 3cde709..91bdbf2 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -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;
}