https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cb9a9fa9841e6c1c0e4ad…
commit cb9a9fa9841e6c1c0e4ada5bdca0539beea55db9
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat May 4 09:56:09 2019 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Sat May 4 09:56:09 2019 +0900
[WIN32SS][NTGDI] Wrap IntLPtoDP and IntDPtoLP macros by do { .... } while (0)
---
win32ss/gdi/ntgdi/coord.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/win32ss/gdi/ntgdi/coord.h b/win32ss/gdi/ntgdi/coord.h
index 9c7a75bbcd..6dcf58fc98 100644
--- a/win32ss/gdi/ntgdi/coord.h
+++ b/win32ss/gdi/ntgdi/coord.h
@@ -4,14 +4,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_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 IntDPtoLP(pdc, ppt, count) \
+#define IntDPtoLP(pdc, ppt, count) do { \
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));