[Scummvm-git-logs] scummvm master -> 6b2bf785a4a89eeb62b70e18c91b3b888adc767d

criezy criezy at scummvm.org
Sun Feb 21 15:33:28 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f8facede40 COMMON: Specialize unknownKeyError for const char*
6b2bf785a4 COMMON: Correctly specialize unknownKeyError for int.


Commit: f8facede409ac4f508683604a974ee537d98e55d
    https://github.com/scummvm/scummvm/commit/f8facede409ac4f508683604a974ee537d98e55d
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2021-02-21T15:33:26Z

Commit Message:
COMMON: Specialize unknownKeyError for const char*

Changed paths:
    common/hashmap.cpp
    common/hashmap.h


diff --git a/common/hashmap.cpp b/common/hashmap.cpp
index ce03c6bdb5..b325abf193 100644
--- a/common/hashmap.cpp
+++ b/common/hashmap.cpp
@@ -93,6 +93,10 @@ template<> void unknownKeyError(void *key) {
 	error("Unknown key \"%p\"", key);
 }
 
+template<> void unknownKeyError(const char *key) {
+	error("Unknown key \"%s\"", key);
+}
+
 #ifdef DEBUG_HASH_COLLISIONS
 static double
 	g_collisions = 0,
diff --git a/common/hashmap.h b/common/hashmap.h
index 7d94adc2d2..bd15639207 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -331,6 +331,8 @@ template<>
 void NORETURN_PRE unknownKeyError(long long unsigned key) NORETURN_POST;
 template<>
 void NORETURN_PRE unknownKeyError(void *key) NORETURN_POST;
+template<>
+void NORETURN_PRE unknownKeyError(const char *key) NORETURN_POST;
 
 //-------------------------------------------------------
 // HashMap functions


Commit: 6b2bf785a4a89eeb62b70e18c91b3b888adc767d
    https://github.com/scummvm/scummvm/commit/6b2bf785a4a89eeb62b70e18c91b3b888adc767d
Author: Henrik "Henke37" Andersson (henke at henke37.cjb.net)
Date: 2021-02-21T15:33:26Z

Commit Message:
COMMON: Correctly specialize unknownKeyError for int.

Changed paths:
    common/hashmap.cpp
    common/hashmap.h


diff --git a/common/hashmap.cpp b/common/hashmap.cpp
index b325abf193..24ff261c1e 100644
--- a/common/hashmap.cpp
+++ b/common/hashmap.cpp
@@ -81,6 +81,16 @@ template<> void unknownKeyError(long unsigned key) {
 	error("Unknown key \"%lu\"", key);
 }
 
+template<>
+void unknownKeyError(signed int key) {
+	error("Unknown key \"%i\"", key);
+}
+
+template<>
+void unknownKeyError(unsigned int key) {
+	error("Unknown key \"%u\"", key);
+}
+
 template<> void unknownKeyError(long long signed key) {
 	error("Unknown key \"%lli\"", key);
 }
diff --git a/common/hashmap.h b/common/hashmap.h
index bd15639207..848e600fbb 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -326,6 +326,10 @@ void NORETURN_PRE unknownKeyError(long signed key) NORETURN_POST;
 template<>
 void NORETURN_PRE unknownKeyError(long unsigned key) NORETURN_POST;
 template<>
+void NORETURN_PRE unknownKeyError(signed int key) NORETURN_POST;
+template<>
+void NORETURN_PRE unknownKeyError(unsigned int key) NORETURN_POST;
+template<>
 void NORETURN_PRE unknownKeyError(long long signed key) NORETURN_POST;
 template<>
 void NORETURN_PRE unknownKeyError(long long unsigned key) NORETURN_POST;




More information about the Scummvm-git-logs mailing list