[Positioner] PosUtil: improve assert_uppercase()
This commit is contained in:
parent
b1fc4a0aa2
commit
e749542ddc
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue