[clang-tidy] Add parentheses to macro arguments

Found with bugprone-macro-parentheses

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2019-11-07 12:44:10 -08:00 committed by Victor Zverovich
parent 0f0848e4f4
commit e6e8298904
3 changed files with 6 additions and 6 deletions

View File

@ -188,7 +188,7 @@
#endif
#ifndef FMT_ASSERT
# define FMT_ASSERT(condition, message) assert((condition) && message)
# define FMT_ASSERT(condition, message) assert((condition) && (message))
#endif
// libc++ supports string_view in pre-c++17.

View File

@ -280,9 +280,9 @@ template <typename T>
const char basic_data<T>::hex_digits[] = "0123456789abcdef";
#define FMT_POWERS_OF_10(factor) \
factor * 10, factor * 100, factor * 1000, factor * 10000, factor * 100000, \
factor * 1000000, factor * 10000000, factor * 100000000, \
factor * 1000000000
factor * 10, (factor) * 100, (factor) * 1000, (factor) * 10000, (factor) * 100000, \
(factor) * 1000000, (factor) * 10000000, (factor) * 100000000, \
(factor) * 1000000000
template <typename T>
const uint64_t basic_data<T>::powers_of_10_64[] = {

View File

@ -54,8 +54,8 @@
#ifndef _WIN32
# define FMT_RETRY_VAL(result, expression, error_result) \
do { \
result = (expression); \
} while (result == error_result && errno == EINTR)
(result) = (expression); \
} while ((result) == (error_result) && errno == EINTR)
#else
# define FMT_RETRY_VAL(result, expression, error_result) result = (expression)
#endif