[WIN32SS][NTGDI] Wrap IntLPtoDP and IntDPtoLP macros by do { .... } while (0)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sat, 4 May 2019 00:56:09 +0000 (09:56 +0900)
committerKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sat, 4 May 2019 00:56:09 +0000 (09:56 +0900)
win32ss/gdi/ntgdi/coord.h

index 9c7a75b..6dcf58f 100644 (file)
@@ -4,14 +4,16 @@
 #define MIN_COORD (INT_MIN / 16)
 #define MAX_COORD (INT_MAX / 16)
 
 #define MIN_COORD (INT_MIN / 16)
 #define MAX_COORD (INT_MAX / 16)
 
-#define IntLPtoDP(pdc, ppt, count) \
+#define IntLPtoDP(pdc, ppt, count) do { \
         DC_vUpdateWorldToDevice(pdc); \
         DC_vUpdateWorldToDevice(pdc); \
-        DC_vXformWorldToDevice(pdc, count, (PPOINTL)(ppt), (PPOINTL)(ppt));
+        DC_vXformWorldToDevice(pdc, count, (PPOINTL)(ppt), (PPOINTL)(ppt)); \
+    } while (0)
 #define CoordLPtoDP(pdc, ppt) \
         DC_vXformWorldToDevice(pdc, 1,  (PPOINTL)(ppt), (PPOINTL)(ppt));
 #define CoordLPtoDP(pdc, ppt) \
         DC_vXformWorldToDevice(pdc, 1,  (PPOINTL)(ppt), (PPOINTL)(ppt));
-#define IntDPtoLP(pdc, ppt, count) \
+#define IntDPtoLP(pdc, ppt, count) do { \
         DC_vUpdateDeviceToWorld(pdc); \
         DC_vUpdateDeviceToWorld(pdc); \
-        DC_vXformDeviceToWorld(pdc, count, (PPOINTL)(ppt), (PPOINTL)(ppt));
+        DC_vXformDeviceToWorld(pdc, count, (PPOINTL)(ppt), (PPOINTL)(ppt)); \
+    } while (0)
 #define CoordDPtoLP(pdc, ppt) \
         DC_vXformDeviceToWorld(pdc, 1, (PPOINTL)(ppt), (PPOINTL)(ppt));
 
 #define CoordDPtoLP(pdc, ppt) \
         DC_vXformDeviceToWorld(pdc, 1, (PPOINTL)(ppt), (PPOINTL)(ppt));