games-strategy/seven-kingdoms: Fix C++17 does not allow register storage class

Closes: https://bugs.gentoo.org/895996
Closes: https://github.com/gentoo/gentoo/pull/31954
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Signed-off-by: Sergey Popov <pinkbyte@gentoo.org>
This commit is contained in:
Brahmajit Das
2023-07-19 07:47:21 +00:00
committed by Sergey Popov
parent bf677ba42a
commit 438973c52e
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
Bug: https://bugs.gentoo.org/895996
--- a/src/OMISC.cpp
+++ b/src/OMISC.cpp
@@ -608,7 +608,7 @@ int Misc::str_icmpx( const char* str1, const char* str2 )
err_when( !str1 || !str2 );
int i;
- register int a,b;
+ int a,b;
for (i=0 ; (a=str1[i]) != '\0' && (b=str2[i]) != '\0' ; i++)
--- a/src/OSPATHBT.cpp
+++ b/src/OSPATHBT.cpp
@@ -50,7 +50,7 @@ void NodePriorityQueue::reset_priority_queue()
void NodePriorityQueue::insert_node(Node *insertNode)
{
unsigned int i = ++size;
- register int f=insertNode->node_f;
+ int f=insertNode->node_f;
Node **localElements = elements;
while(i>1 && localElements[i/2]->node_f > f)

View File

@@ -26,6 +26,10 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/${P}-c++17.patch"
)
src_unpack() {
unpack ${MY_P}.tar.xz
}