Fixed sorting assertion with some std::sort implementations.

Change-Id: Idd925c9cc5cd2a35e06f4d832734180f5c38378e
Tested: on Linux.
parent ec8038cc
......@@ -912,7 +912,9 @@ class Builder FLATBUFFERS_FINAL_CLASS {
auto comp = strcmp(as, bs);
// If this assertion hits, you've added two keys with the same value to
// 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;
});
// First create a vector out of all keys.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment