renamed functions

More descriptive name, show that it's really just a temporary object.
parent 023fec62
...@@ -1153,13 +1153,13 @@ template<typename T> const T *GetRoot(const void *buf) { ...@@ -1153,13 +1153,13 @@ template<typename T> const T *GetRoot(const void *buf) {
/// Helpers to get a typed pointer to objects that are currently beeing built. /// Helpers to get a typed pointer to objects that are currently beeing built.
/// @warning Creating new objects will lead to reallocations and invalidates the pointer! /// @warning Creating new objects will lead to reallocations and invalidates the pointer!
template<typename T> T *GetMutableObject(FlatBufferBuilder &fbb, Offset<T> offset) { template<typename T> T *GetMutableTemporaryPointer(FlatBufferBuilder &fbb, Offset<T> offset) {
return reinterpret_cast<T *>(fbb.GetCurrentBufferPointer() + return reinterpret_cast<T *>(fbb.GetCurrentBufferPointer() +
fbb.GetSize() - offset.o); fbb.GetSize() - offset.o);
} }
template<typename T> const T *GetObject(FlatBufferBuilder &fbb, Offset<T> offset) { template<typename T> const T *GetTemporaryPointer(FlatBufferBuilder &fbb, Offset<T> offset) {
return GetMutableObject<T>(fbb, offset); return GetMutableTemporaryPointer<T>(fbb, offset);
} }
// Helper to see if the identifier in a buffer has the expected value. // Helper to see if the identifier in a buffer has the expected value.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment