matlabbe
2023-03-16 17:48:40 -07:00
parent 6fe5e6375f
commit e3b7e9378d
9 changed files with 36 additions and 19 deletions
+8 -2
View File
@@ -324,7 +324,10 @@ public:
#endif
/** Strict less ordering by name of key only */
struct KeyOrder : std::binary_function<Entry, Entry, bool> {
struct KeyOrder {
using result_type = bool;
using first_argument_type = Entry;
using second_argument_type = Entry;
bool operator()(const Entry & lhs, const Entry & rhs) const {
const static SI_STRLESS isLess = SI_STRLESS();
return isLess(lhs.pItem, rhs.pItem);
@@ -332,7 +335,10 @@ public:
};
/** Strict less ordering by order, and then name of key */
struct LoadOrder : std::binary_function<Entry, Entry, bool> {
struct LoadOrder {
using result_type = bool;
using first_argument_type = Entry;
using second_argument_type = Entry;
bool operator()(const Entry & lhs, const Entry & rhs) const {
if (lhs.nOrder != rhs.nOrder) {
return lhs.nOrder < rhs.nOrder;