diff --git a/owlps-positioner/src/posutil.hh b/owlps-positioner/src/posutil.hh index 7c7999e..c2cecfa 100644 --- a/owlps-positioner/src/posutil.hh +++ b/owlps-positioner/src/posutil.hh @@ -133,10 +133,12 @@ inline void PosUtil::to_upper(std::string &str) # define assert_uppercase(STR) #else // NDEBUG # define assert_uppercase(STR) \ - ({std::string str_up((STR)) ; \ + do { \ + std::string str((STR)) ; \ + std::string str_up(str) ; \ PosUtil::to_upper(str_up) ; \ - assert(str_up == (STR)) ; \ - }) + assert(str_up == str) ; \ + } while (0) #endif // NDEBUG