[Scummvm-git-logs] scummvm master -> b224b592c6770017470449817ae5d4b10f4a4aab

bonki bonki at users.noreply.github.com
Sun May 6 01:12:59 CEST 2018


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

Summary:
b224b592c6 BACKENDS: Replace usage of stricmp/strcmpi/strcasecmp


Commit: b224b592c6770017470449817ae5d4b10f4a4aab
    https://github.com/scummvm/scummvm/commit/b224b592c6770017470449817ae5d4b10f4a4aab
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-05-06T01:12:56+02:00

Commit Message:
BACKENDS: Replace usage of stricmp/strcmpi/strcasecmp

Changed paths:
    backends/platform/dc/selector.cpp
    backends/platform/n64/osys_n64_base.cpp
    backends/platform/psp/display_manager.cpp


diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 6717ca4..033f06e 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -155,11 +155,7 @@ static Game the_game;
 
 static bool isIcon(const Common::FSNode &entry)
 {
-  int l = entry.getDisplayName().size();
-  if (l>4 && !strcasecmp(entry.getDisplayName().c_str()+l-4, ".ICO"))
-    return true;
-  else
-    return false;
+	return entry.getDisplayName().hasSuffixIgnoreCase(".ICO");
 }
 
 static bool loadIcon(Game &game, Dir *dirs, int num_dirs)
@@ -203,7 +199,7 @@ static bool uniqueGame(const char *base, const char *dir,
 	  this is a workaround for the detector bug in toon... */
 	sameOrSubdir(dir, games->dir) &&
 	/*!strcmp(dir, games->dir) &&*/
-	!stricmp(base, games->filename_base) &&
+	!scumm_stricmp(base, games->filename_base) &&
 	lang == games->language &&
 	plf == games->platform)
       return false;
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 1282b16..2bde28d 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -227,7 +227,7 @@ int OSystem_N64::getDefaultGraphicsMode() const {
 bool OSystem_N64::setGraphicsMode(const char *mode) {
 	int i = 0;
 	while (s_supportedGraphicsModes[i].name) {
-		if (!strcmpi(s_supportedGraphicsModes[i].name, mode)) {
+		if (!scumm_stricmp(s_supportedGraphicsModes[i].name, mode)) {
 			_graphicMode = s_supportedGraphicsModes[i].id;
 
 			switchGraphicModeId(_graphicMode);
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index 33bf190..54ad0d3 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -332,7 +332,7 @@ bool DisplayManager::setGraphicsMode(const char *name) {
 	int i = 0;
 
 	while (_supportedModes[i].name) {
-		if (!strcmpi(_supportedModes[i].name, name)) {
+		if (!scumm_stricmp(_supportedModes[i].name, name)) {
 			setGraphicsMode(_supportedModes[i].id);
 			return true;
 		}





More information about the Scummvm-git-logs mailing list