Fix high certainty warnings from PVS-studio (#5115)

* Fix high certainty warnings from PVS-studio

- Introduced FLATBUFFERS_ATTRIBUTE macro to use [[attribute]] if modern C++ compiler used

* Update the note about __cplusplus usage in the MSVC
This commit is contained in:
Vladimir Glavnyy
2019-01-18 00:49:27 +07:00
committed by Wouter van Oortmerssen
parent bbfd12eb11
commit d44931656a
8 changed files with 49 additions and 25 deletions

View File

@@ -66,7 +66,7 @@ inline bool is_digit(char c) { return check_in_range(c, '0', '9'); }
inline bool is_xdigit(char c) {
// Replace by look-up table.
return is_digit(c) | check_in_range(c & 0xDF, 'a' & 0xDF, 'f' & 0xDF);
return is_digit(c) || check_in_range(c & 0xDF, 'a' & 0xDF, 'f' & 0xDF);
}
// Case-insensitive isalnum