summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-05-09 21:42:30 +0200
committerZenWalker <[email protected]>2019-05-10 15:23:44 +0200
commita7275d5e5fb15f86fe2dec1a392fd62f32193137 (patch)
treeea3b87c336a001ce6dc5fcfaa0dee1e13b326703
parent6164765c4150be348cf6397f679a17d9bb8fc930 (diff)
downloadmate-panel-a7275d5e5fb15f86fe2dec1a392fd62f32193137.tar.bz2
mate-panel-a7275d5e5fb15f86fe2dec1a392fd62f32193137.tar.xz
button-widget: Clarify calculation precedence for '&' and '?'
Fixes cppcheck warnings: [mate-panel/button-widget.c:180]: (style) Clarify calculation precedence for '&' and '?'. [mate-panel/button-widget.c:181]: (style) Clarify calculation precedence for '&' and '?'. [mate-panel/button-widget.c:315]: (style) Clarify calculation precedence for '&' and '?'.
-rw-r--r--mate-panel/button-widget.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c
index 02f69fb0..c521c1af 100644
--- a/mate-panel/button-widget.c
+++ b/mate-panel/button-widget.c
@@ -177,8 +177,8 @@ button_widget_reload_surface (ButtonWidget *button)
panel_load_icon (button->priv->icon_theme,
button->priv->filename,
button->priv->size * scale,
- button->priv->orientation & PANEL_VERTICAL_MASK ? button->priv->size * scale : -1,
- button->priv->orientation & PANEL_HORIZONTAL_MASK ? button->priv->size * scale: -1,
+ (button->priv->orientation & PANEL_VERTICAL_MASK) ? button->priv->size * scale : -1,
+ (button->priv->orientation & PANEL_HORIZONTAL_MASK) ? button->priv->size * scale: -1,
&error);
if (error) {
//FIXME: this is not rendered at button->priv->size
@@ -312,7 +312,7 @@ calc_arrow (PanelOrientation orientation,
button_height = 50;
}
- *size = (orientation & PANEL_HORIZONTAL_MASK ? button_width : button_height) / 2;
+ *size = ((orientation & PANEL_HORIZONTAL_MASK) ? button_width : button_height) / 2;
*angle = 0;
switch (orientation) {