mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 13:40:00 +00:00
Fixed sorting assertion with some std::sort implementations.
Change-Id: Idd925c9cc5cd2a35e06f4d832734180f5c38378e Tested: on Linux.
This commit is contained in:
@@ -912,7 +912,9 @@ class Builder FLATBUFFERS_FINAL_CLASS {
|
|||||||
auto comp = strcmp(as, bs);
|
auto comp = strcmp(as, bs);
|
||||||
// If this assertion hits, you've added two keys with the same value to
|
// If this assertion hits, you've added two keys with the same value to
|
||||||
// this map.
|
// this map.
|
||||||
assert(comp);
|
// TODO: Have to check for pointer equality, as some sort implementation
|
||||||
|
// apparently call this function with the same element?? Why?
|
||||||
|
assert(comp || &a == &b);
|
||||||
return comp < 0;
|
return comp < 0;
|
||||||
});
|
});
|
||||||
// First create a vector out of all keys.
|
// First create a vector out of all keys.
|
||||||
|
|||||||
Reference in New Issue
Block a user