diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-27 18:30:35 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-30 23:37:44 +0300 |
commit | 0f235ac6d5a0e3f795c770d44cb172307d0e3123 (patch) | |
tree | 7628393f446f994ac208dda44bd324ca511d219b | |
parent | 5bb7ebd7de5a020cda7ab1a590d81c73acdf377e (diff) | |
download | qtlocation-mapboxgl-0f235ac6d5a0e3f795c770d44cb172307d0e3123.tar.gz |
[core] Fix bugprone-macro-parentheses errors
As reported by clang-tidy-8.
-rw-r--r-- | platform/default/src/mbgl/util/png_writer.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/util/i18n.cpp | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/platform/default/src/mbgl/util/png_writer.cpp b/platform/default/src/mbgl/util/png_writer.cpp index 1cd3cb60b3..4a7ef43052 100644 --- a/platform/default/src/mbgl/util/png_writer.cpp +++ b/platform/default/src/mbgl/util/png_writer.cpp @@ -7,8 +7,7 @@ #include <cassert> #include <cstring> -#define NETWORK_BYTE_UINT32(value) \ - char(value >> 24), char(value >> 16), char(value >> 8), char(value >> 0) +#define NETWORK_BYTE_UINT32(value) char((value) >> 24), char((value) >> 16), char((value) >> 8), char((value) >> 0) namespace { diff --git a/src/mbgl/util/i18n.cpp b/src/mbgl/util/i18n.cpp index 885c8ec3d1..ce3ef65f3a 100644 --- a/src/mbgl/util/i18n.cpp +++ b/src/mbgl/util/i18n.cpp @@ -12,10 +12,8 @@ namespace { @param first The first codepoint in the block, inclusive. @param last The last codepoint in the block, inclusive. */ -#define DEFINE_IS_IN_UNICODE_BLOCK(name, first, last) \ - inline bool isIn##name(char16_t codepoint) { \ - return codepoint >= first && codepoint <= last; \ - } +#define DEFINE_IS_IN_UNICODE_BLOCK(name, first, last) \ + inline bool isIn##name(char16_t codepoint) { return codepoint >= (first) && codepoint <= (last); } // The following table comes from <http://www.unicode.org/Public/12.0.0/ucd/Blocks.txt>. // Keep it synchronized with <http://www.unicode.org/Public/UCD/latest/ucd/Blocks.txt>. |