[RocksDB] compare data and not the address on iterator operator== (#2940)

This commit is contained in:
Guilherme Lawless 2020-09-15 18:53:24 +01:00 committed by GitHub
commit 8d0011b96c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ public:
auto result (std::memcmp (current.first.data (), other_a->current.first.data (), current.first.size ()) == 0);
debug_assert (!result || (current.first.size () == other_a->current.first.size ()));
debug_assert (!result || (current.second.data () == other_a->current.second.data ()));
debug_assert (!result || std::memcmp (current.second.data (), other_a->current.second.data (), current.second.size ()) == 0);
debug_assert (!result || (current.second.size () == other_a->current.second.size ()));
return result;
}