commit:     811a2e0756ef3f8028d48ab4193287e7d055afe1
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri May 21 22:13:49 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri May 21 22:13:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=811a2e07

games-emulation/snes9x: Use upstream patch for GCC 11

* I didn't see the patch until after I committed my own fix already.

Closes: https://bugs.gentoo.org/789963
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../snes9x/files/snes9x-1.60-gcc11.patch           | 28 +++++++++++++++++-----
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch 
b/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch
index 1b9a70b7f09..453771f5139 100644
--- a/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch
+++ b/games-emulation/snes9x/files/snes9x-1.60-gcc11.patch
@@ -1,17 +1,31 @@
+From 7f6d9d6432d912cd90763c64f7c92270b3e6c182 Mon Sep 17 00:00:00 2001
+From: gocha <[email protected]>
+Date: Sun, 19 Jan 2020 12:48:06 +0900
+Subject: [PATCH] win32: fix compilation error in vs2019
+
+---
+ conffile.cpp | 2 +-
+ conffile.h   | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/conffile.cpp b/conffile.cpp
+index 817afae7f..fa7de3fa2 100644
 --- a/conffile.cpp
 +++ b/conffile.cpp
-@@ -452,7 +452,7 @@
+@@ -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 {
++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);
+diff --git a/conffile.h b/conffile.h
+index ba69812df..d92128cba 100644
 --- a/conffile.h
 +++ b/conffile.h
-@@ -90,7 +90,7 @@
+@@ -90,7 +90,7 @@ class ConfigFile {
                mutable bool used;
  
          struct section_then_key_less {
@@ -20,12 +34,14 @@
          };
  
          struct key_less {
-@@ -101,7 +101,7 @@
+@@ -101,8 +101,8 @@ class ConfigFile {
          };
  
          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(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;

Reply via email to