Get a mutable pointer to elements inside this array. This method used to mutate arrays of structs followed by a @p Mutate operation. For primitive types use @p Mutate directly. @warning Assignments and reads to/from the dereferenced pointer are not automatically converted to the correct endianness.
| 84 | // @warning Assignments and reads to/from the dereferenced pointer are not |
| 85 | // automatically converted to the correct endianness. |
| 86 | typename flatbuffers::conditional<scalar_tag::value, void, T *>::type |
| 87 | GetMutablePointer(uoffset_t i) const { |
| 88 | FLATBUFFERS_ASSERT(i < size()); |
| 89 | return const_cast<T *>(&data()[i]); |
| 90 | } |
| 91 | |
| 92 | // Change elements if you have a non-const pointer to this object. |
| 93 | void Mutate(uoffset_t i, const T &val) { MutateImpl(scalar_tag(), i, val); } |