[Bf-blender-cvs] [f145366ae07] master: Cleanup: add missing braces, quite warnings by casting

Campbell Barton noreply at git.blender.org
Fri Aug 12 04:14:08 CEST 2022


Commit: f145366ae078b4ffdcb4a80a7a3011a336a61ed2
Author: Campbell Barton
Date:   Fri Aug 12 12:12:44 2022 +1000
Branches: master
https://developer.blender.org/rBf145366ae078b4ffdcb4a80a7a3011a336a61ed2

Cleanup: add missing braces, quite warnings by casting

===================================================================

M	intern/ghost/intern/GHOST_SystemX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 07d8b02f8ad..0494e462bfc 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -674,11 +674,12 @@ bool GHOST_SystemX11::processEvents(bool waitForEvent)
           GHOST_WindowX11 *window = findGhostWindow(xevent.xany.window);
           if (window && !window->getX11_XIC() && window->createX11_XIC()) {
             GHOST_PRINT("XIM input context created\n");
-            if (xevent.type == KeyPress)
+            if (xevent.type == KeyPress) {
               /* we can assume the window has input focus
                * here, because key events are received only
                * when the window is focused. */
               XSetICFocus(window->getX11_XIC());
+            }
           }
         }
       }
@@ -2384,10 +2385,11 @@ class DialogData {
   /* Is the mouse inside the given button */
   bool isInsideButton(XEvent &e, uint button_num)
   {
-    return ((e.xmotion.y > height - padding_y - button_height) &&
-            (e.xmotion.y < height - padding_y) &&
-            (e.xmotion.x > width - (padding_x + button_width) * button_num) &&
-            (e.xmotion.x < width - padding_x - (padding_x + button_width) * (button_num - 1)));
+    return (
+        (e.xmotion.y > (int)(height - padding_y - button_height)) &&
+        (e.xmotion.y < (int)(height - padding_y)) &&
+        (e.xmotion.x > (int)(width - (padding_x + button_width) * button_num)) &&
+        (e.xmotion.x < (int)(width - padding_x - (padding_x + button_width) * (button_num - 1))));
   }
 };



More information about the Bf-blender-cvs mailing list