Browse Source

Trade: yup, it was libc++.

Not sure, but maybe calling `compare(a, a)` inside `std::sort()` isn't
the best plan for having the sorting done fast??
pull/525/head
Vladimír Vondruš 5 years ago
parent
commit
491751b551
  1. 3
      src/Magnum/Trade/MaterialData.cpp

3
src/Magnum/Trade/MaterialData.cpp

@ -238,7 +238,8 @@ MaterialData::MaterialData(const MaterialTypes types, Containers::Array<Material
Additionally an *extra paranoid* check for shitty STL Additionally an *extra paranoid* check for shitty STL
implementations that might call this comparator with both implementations that might call this comparator with both
arguments the same (in which case the assert would fire, arguments the same (in which case the assert would fire,
which is undesirable). */ which is undesirable). Apparently libc++ is responsible for
such atrocities. */
CORRADE_ASSERT(&a == &b || a.name() != b.name(), CORRADE_ASSERT(&a == &b || a.name() != b.name(),
"Trade::MaterialData: duplicate attribute" << a.name(), false); "Trade::MaterialData: duplicate attribute" << a.name(), false);
return a.name() < b.name(); return a.name() < b.name();

Loading…
Cancel
Save