Skip to content

Commit

Permalink
win32: fix compilation error in vs2019
Browse files Browse the repository at this point in the history
  • Loading branch information
gocha committed Jan 19, 2020
1 parent c7a2fc2 commit 7f6d9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conffile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void ConfigFile::ClearLines()
}
}

bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) {
bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) const{
if(curConfigFile && a.section!=b.section){
const int sva = curConfigFile->GetSectionSize(a.section);
const int svb = curConfigFile->GetSectionSize(b.section);
Expand Down
6 changes: 3 additions & 3 deletions conffile.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ConfigFile {
mutable bool used;

struct section_then_key_less {
bool operator()(const ConfigEntry &a, const ConfigEntry &b);
bool operator()(const ConfigEntry &a, const ConfigEntry &b) const;
};

struct key_less {
Expand All @@ -101,8 +101,8 @@ class ConfigFile {
};

struct line_less {
bool operator()(const ConfigEntry &a, const ConfigEntry &b){
if(a.line==b.line) return (b.val.empty() && !a.val.empty()) || a.key<b.key;
bool operator()(const ConfigEntry &a, const ConfigEntry &b) const{
if(a.line==b.line) return (b.val.empty() && !a.val.empty()) || a.key<b.key;
if(b.line<0) return true;
if(a.line<0) return false;
return a.line<b.line;
Expand Down

0 comments on commit 7f6d9d6

Please sign in to comment.