forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-emulation/snes9x: Fix building against GCC 11
Closes: https://bugs.gentoo.org/789963 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert <[email protected]>
- Loading branch information
1 parent
955f7bd
commit 7c5b7e1
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- a/conffile.cpp | ||
+++ b/conffile.cpp | ||
@@ -452,7 +452,7 @@ | ||
} | ||
} | ||
|
||
-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); | ||
--- a/conffile.h | ||
+++ b/conffile.h | ||
@@ -90,7 +90,7 @@ | ||
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 { | ||
@@ -101,7 +101,7 @@ | ||
}; | ||
|
||
struct line_less { | ||
- bool operator()(const ConfigEntry &a, const ConfigEntry &b){ | ||
+ 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters