mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-17 20:16:32 +00:00
Removal of support for FLATBUFFERS_CPP98_STL (#6918)
* Removal of support for FLATBUFFERS_CPP98_STL For context, see https://github.com/google/flatbuffers/issues/6704 * Also removed vector_data
This commit is contained in:
committed by
GitHub
parent
3fab0c6ee4
commit
6748c373be
@@ -379,12 +379,12 @@ template<typename T, typename U> class pointer_inside_vector {
|
||||
public:
|
||||
pointer_inside_vector(T *ptr, std::vector<U> &vec)
|
||||
: offset_(reinterpret_cast<uint8_t *>(ptr) -
|
||||
reinterpret_cast<uint8_t *>(flatbuffers::vector_data(vec))),
|
||||
reinterpret_cast<uint8_t *>(vec.data())),
|
||||
vec_(vec) {}
|
||||
|
||||
T *operator*() const {
|
||||
return reinterpret_cast<T *>(
|
||||
reinterpret_cast<uint8_t *>(flatbuffers::vector_data(vec_)) + offset_);
|
||||
return reinterpret_cast<T *>(reinterpret_cast<uint8_t *>(vec_.data()) +
|
||||
offset_);
|
||||
}
|
||||
T *operator->() const { return operator*(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user