mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 20:01:47 +00:00
Change nested_root accessor to be const function.
The `<field>_nested_root()` is not viable from const object. (We usually get `const Monster *`.) Change-Id: I0d0adcb38dd974318608417ee3094c34fb9c480d
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
620fe1c5cf
commit
c9a840e935
@@ -138,7 +138,7 @@ struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
const flatbuffers::Vector<flatbuffers::Offset<Monster>> *testarrayoftables() const { return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Monster>> *>(26); }
|
||||
const Monster *enemy() const { return GetPointer<const Monster *>(28); }
|
||||
const flatbuffers::Vector<uint8_t> *testnestedflatbuffer() const { return GetPointer<const flatbuffers::Vector<uint8_t> *>(30); }
|
||||
const Monster *testnestedflatbuffer_nested_root() { return flatbuffers::GetRoot<Monster>(testnestedflatbuffer()->Data()); }
|
||||
const Monster *testnestedflatbuffer_nested_root() const { return flatbuffers::GetRoot<Monster>(testnestedflatbuffer()->Data()); }
|
||||
const Stat *testempty() const { return GetPointer<const Stat *>(32); }
|
||||
uint8_t testbool() const { return GetField<uint8_t>(34, 0); }
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
|
||||
Reference in New Issue
Block a user