mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 12:40:00 +00:00
renamed functions
More descriptive name, show that it's really just a temporary object.
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user