clang-tidy: use patentheses in macros

Found with bugprone-macro-parentheses

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2022-11-26 22:30:24 -08:00 committed by Urs Fleisch
parent f40290dcaf
commit 9427d8f3ba
2 changed files with 4 additions and 4 deletions

View File

@ -31,8 +31,8 @@
#if defined(HAVE_GCC_ATOMIC)
# define ATOMIC_INT int
# define ATOMIC_INC(x) __sync_add_and_fetch(&x, 1)
# define ATOMIC_DEC(x) __sync_sub_and_fetch(&x, 1)
# define ATOMIC_INC(x) __sync_add_and_fetch(&(x), 1)
# define ATOMIC_DEC(x) __sync_sub_and_fetch(&(x), 1)
#elif defined(HAVE_WIN_ATOMIC)
# if !defined(NOMINMAX)
# define NOMINMAX

View File

@ -45,7 +45,7 @@
#if defined(QT_VERSION) && (QT_VERSION >= 0x040000)
#define QStringToTString(s) TagLib::String(s.toUtf8().data(), TagLib::String::UTF8)
#else
#define QStringToTString(s) TagLib::String(s.utf8().data(), TagLib::String::UTF8)
#define QStringToTString(s) TagLib::String((s).utf8().data(), TagLib::String::UTF8)
#endif
/*!
@ -58,7 +58,7 @@
*
*/
#define TStringToQString(s) QString::fromUtf8(s.toCString(true))
#define TStringToQString(s) QString::fromUtf8((s).toCString(true))
namespace TagLib {