mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:49:01 +08:00
24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
|
diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
|
||
|
index c4dc5bc..c090455 100644
|
||
|
--- a/include/flatbuffers/flatbuffers.h
|
||
|
+++ b/include/flatbuffers/flatbuffers.h
|
||
|
@@ -1861,14 +1861,14 @@ class FlatBufferBuilder {
|
||
|
|
||
|
/// @cond FLATBUFFERS_INTERNAL
|
||
|
template<typename T> struct TableKeyComparator {
|
||
|
- TableKeyComparator(vector_downward &buf) : buf_(buf) {}
|
||
|
+ TableKeyComparator(vector_downward &buf) : buf_(&buf) {}
|
||
|
TableKeyComparator(const TableKeyComparator &other) : buf_(other.buf_) {}
|
||
|
bool operator()(const Offset<T> &a, const Offset<T> &b) const {
|
||
|
- auto table_a = reinterpret_cast<T *>(buf_.data_at(a.o));
|
||
|
- auto table_b = reinterpret_cast<T *>(buf_.data_at(b.o));
|
||
|
+ auto table_a = reinterpret_cast<T *>(buf_->data_at(a.o));
|
||
|
+ auto table_b = reinterpret_cast<T *>(buf_->data_at(b.o));
|
||
|
return table_a->KeyCompareLessThan(table_b);
|
||
|
}
|
||
|
- vector_downward &buf_;
|
||
|
+ vector_downward *buf_;
|
||
|
|
||
|
private:
|
||
|
TableKeyComparator &operator=(const TableKeyComparator &other) {
|