PVS V542: operator precedence issue accross macro expansion
In CodyCam, we attempt to cast the result of this macro to const char*. However, the ternary operator has lower priority than the cast so it doesn't work as expected. Add some protective parentheses here. Change-Id: I5e9875187cec67b9534b1bbe58d82217c6cd5524 Reviewed-on: https://review.haiku-os.org/c/1667 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
e1633b4220
commit
103741882a
@@ -119,10 +119,10 @@ private:
|
||||
|
||||
#undef B_TRANSLATE_SYSTEM_NAME
|
||||
#define B_TRANSLATE_SYSTEM_NAME(string) \
|
||||
BLocaleRoster::Default()->IsFilesystemTranslationPreferred() \
|
||||
(BLocaleRoster::Default()->IsFilesystemTranslationPreferred() \
|
||||
? BLocaleRoster::Default()->GetCatalog()->GetString((string), \
|
||||
B_TRANSLATION_SYSTEM_NAME_CONTEXT) \
|
||||
: (string)
|
||||
: (string))
|
||||
|
||||
// Translation markers which can be used to mark static strings/IDs which
|
||||
// are used as key for translation requests (at other places in the code).
|
||||
|
||||
Reference in New Issue
Block a user