From 78d3b083e1c946d4d054d8ed414cb7cb5f46264b Mon Sep 17 00:00:00 2001 From: Zero Fanker Date: Mon, 17 Jun 2024 00:43:05 -0400 Subject: [PATCH] restored customized ini section map compare operator . --- MissionEditor/IniFile.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/MissionEditor/IniFile.h b/MissionEditor/IniFile.h index d2ca281..f2c7057 100644 --- a/MissionEditor/IniFile.h +++ b/MissionEditor/IniFile.h @@ -41,6 +41,24 @@ using std::vector; using std::map; +class SortDummy +{ +public: + bool operator()(const CString& x, const CString& y) const + { + // the length is more important than spelling (numbers!!!)... + if (x.GetLength() < y.GetLength()) { + return true; + } + if (x.GetLength() == y.GetLength()) { + if (x < y) { + return true; + } + } + return false; + } +}; + class CIniFileSection { public: @@ -198,7 +216,7 @@ public: } private: - map value_pos{}; + map value_pos{}; Container value_pairs{};// sequenced };