mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-11 07:27:27 +00:00
[C++] Removed most heap allocations in builder (#6620)
* [C++] Removed most heap allocations in builder * Updated API docs to indicate heap usage * Override assertion for heap allocation in parser * Cleaned up implemenations, enable heap alloc for tests * Generalized CreateVectorOfStrings * remove cmake option for heap alloc. reverted two heap removals * Only use scratch space for vector of strings * Override Windows SCL warning * Changed std::transform to for loop to avoid MSCV warnings * switched to const iterators
This commit is contained in:
@@ -247,6 +247,11 @@ namespace flatbuffers {
|
||||
#endif // __has_include
|
||||
#endif // !FLATBUFFERS_HAS_STRING_VIEW
|
||||
|
||||
#ifndef FLATBUFFERS_GENERAL_HEAP_ALLOC_OK
|
||||
// Allow heap allocations to be used
|
||||
#define FLATBUFFERS_GENERAL_HEAP_ALLOC_OK 1
|
||||
#endif // !FLATBUFFERS_GENERAL_HEAP_ALLOC_OK
|
||||
|
||||
#ifndef FLATBUFFERS_HAS_NEW_STRTOD
|
||||
// Modern (C++11) strtod and strtof functions are available for use.
|
||||
// 1) nan/inf strings as argument of strtod;
|
||||
|
||||
Reference in New Issue
Block a user