From 129ccb891e083cb460295a1c6c47f33db58e8587 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 19 Mar 2023 19:21:42 +0000 Subject: [PATCH] Use standard paradigm for macro scope limiting. --- pcbnew/drc/drc_test_provider_library_parity.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/drc/drc_test_provider_library_parity.cpp b/pcbnew/drc/drc_test_provider_library_parity.cpp index 44a7eb0af6..5bb03d379b 100644 --- a/pcbnew/drc/drc_test_provider_library_parity.cpp +++ b/pcbnew/drc/drc_test_provider_library_parity.cpp @@ -75,7 +75,7 @@ public: // In "DRC" mode (aReporter == nulltpr) properties are only checked until a difference is found. // #define TEST( a, b, msg ) \ - { \ + do { \ if( a != b ) \ { \ diff = true; \ @@ -86,11 +86,11 @@ public: \ if( diff && !aReporter ) \ return diff; \ - } + } while (0) #define EPSILON 0.000001 #define TEST_D( a, b, msg ) \ - { \ + do { \ if( abs( a - b ) > EPSILON ) \ { \ diff = true; \ @@ -101,10 +101,10 @@ public: \ if( diff && !aReporter ) \ return diff; \ - } + } while (0) #define TEST_V3D( a, b, msg ) \ - { \ + do { \ if( abs( a.x - b.x ) > EPSILON \ || abs( a.y - b.y ) > EPSILON \ || abs( a.z - b.z ) > EPSILON ) \ @@ -117,7 +117,7 @@ public: \ if( diff && !aReporter ) \ return diff; \ - } + } while (0) #define ITEM_DESC( item ) ( item )->GetItemDescription( &g_unitsProvider )