summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-05-09 21:45:08 +0200
committerZenWalker <[email protected]>2019-05-10 15:23:44 +0200
commit5497beb64ca17a0e80a84c92bc546dc8788f64a1 (patch)
tree456921f22bb683ab4be89357e423f84da12cc987
parenta7275d5e5fb15f86fe2dec1a392fd62f32193137 (diff)
downloadmate-panel-5497beb64ca17a0e80a84c92bc546dc8788f64a1.tar.bz2
mate-panel-5497beb64ca17a0e80a84c92bc546dc8788f64a1.tar.xz
panel-toplevel: Clarify calculation precedence for '&' and '?'
Fixes cppcheck warnings: [mate-panel/panel-toplevel.c:2315]: (style) Clarify calculation precedence for '&' and '?'. [mate-panel/panel-toplevel.c:4687]: (style) Clarify calculation precedence for '&' and '?'. [mate-panel/panel-toplevel.c:5036]: (style) Clarify calculation precedence for '&' and '?'.
-rw-r--r--mate-panel/panel-toplevel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index ab203a66..79ef4c94 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -2312,7 +2312,7 @@ calculate_minimum_height (GtkWidget *widget,
pango_font_description_free (font_desc);
pango_font_metrics_unref (metrics);
- thickness = orientation & PANEL_HORIZONTAL_MASK ?
+ thickness = (orientation & PANEL_HORIZONTAL_MASK) ?
padding.top + padding.bottom :
padding.left + padding.right;
@@ -4684,7 +4684,7 @@ panel_toplevel_setup_widgets (PanelToplevel *toplevel)
container = panel_widget_new (toplevel,
!toplevel->priv->expand,
- toplevel->priv->orientation & PANEL_HORIZONTAL_MASK ?
+ (toplevel->priv->orientation & PANEL_HORIZONTAL_MASK) ?
GTK_ORIENTATION_HORIZONTAL :
GTK_ORIENTATION_VERTICAL,
toplevel->priv->size);
@@ -5033,7 +5033,7 @@ panel_toplevel_set_orientation (PanelToplevel *toplevel,
panel_widget_set_orientation (
toplevel->priv->panel_widget,
- toplevel->priv->orientation & PANEL_HORIZONTAL_MASK ?
+ (toplevel->priv->orientation & PANEL_HORIZONTAL_MASK) ?
GTK_ORIENTATION_HORIZONTAL :
GTK_ORIENTATION_VERTICAL);