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-17 09:49:27 -08:00
committed by Wouter van Oortmerssen
parent bbfd12eb11
commit d44931656a
8 changed files with 49 additions and 25 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ class Registry {
return DetachedBuffer();
}
// We have a valid FlatBuffer. Detach it from the builder and return.
return parser.builder_.ReleaseBufferPointer();
return parser.builder_.Release();
}
// Modify any parsing / output options used by the other functions.