mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-05-05 11:11:42 -04:00
restored customized ini section map compare operator .
This commit is contained in:
parent
ddbf167217
commit
78d3b083e1
1 changed files with 19 additions and 1 deletions
|
@ -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<CString, int64_t> value_pos{};
|
||||
map<CString, int64_t, SortDummy> value_pos{};
|
||||
Container value_pairs{};// sequenced
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue