[Scummvm-git-logs] scummvm master -> 3717b672d1e4a08ac21cf53df9b9f7da37d2471a

dreammaster paulfgilbert at gmail.com
Sun Feb 2 01:48:46 UTC 2020


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:
3717b672d1 ULTIMA: Further compilation fixes


Commit: 3717b672d1e4a08ac21cf53df9b9f7da37d2471a
    https://github.com/scummvm/scummvm/commit/3717b672d1e4a08ac21cf53df9b9f7da37d2471a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-02-01T17:48:37-08:00

Commit Message:
ULTIMA: Further compilation fixes

Changed paths:
    common/str.cpp
    engines/ultima/nuvie/conf/xml_tree.cpp
    engines/ultima/nuvie/sound/adplug/fm_opl.cpp
    engines/ultima/shared/std/misc.cpp
    engines/ultima/shared/std/misc.h
    engines/ultima/shared/std/string.h
    engines/ultima/ultima8/filesys/file_system.cpp


diff --git a/common/str.cpp b/common/str.cpp
index 4930269..1da6f0c 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -788,7 +788,7 @@ String String::substr(size_t pos, size_t len) const {
 	else if (len == npos)
 		return String(_str + pos);
 	else
-		return String(_str + pos, MIN(_size - pos, len));
+		return String(_str + pos, MIN((size_t)_size - pos, len));
 }
 
 #pragma mark -
diff --git a/engines/ultima/nuvie/conf/xml_tree.cpp b/engines/ultima/nuvie/conf/xml_tree.cpp
index 131f4b4..312d24b 100644
--- a/engines/ultima/nuvie/conf/xml_tree.cpp
+++ b/engines/ultima/nuvie/conf/xml_tree.cpp
@@ -35,7 +35,7 @@ Std::string to_uppercase(Std::string s) {
 	Std::string str = s;
 	Std::string::iterator X;
 	for (X = str.begin(); X != str.end(); ++X)
-		*X = Std::toupper(*X);
+		*X = Std::toUpper(*X);
 
 	return str;
 }
diff --git a/engines/ultima/nuvie/sound/adplug/fm_opl.cpp b/engines/ultima/nuvie/sound/adplug/fm_opl.cpp
index 8ee82c0..20233c3 100644
--- a/engines/ultima/nuvie/sound/adplug/fm_opl.cpp
+++ b/engines/ultima/nuvie/sound/adplug/fm_opl.cpp
@@ -145,7 +145,7 @@ typedef struct{
 	uint32	Cnt;		/* frequency counter			*/
 	uint32	Incr;		/* frequency counter step		*/
 	uint8   FB;			/* feedback shift value			*/
-	int32   *connect1;	/* slot1 output pointer			*/
+	signed int *connect1;	/* slot1 output pointer			*/
 	int32   op1_out[2];	/* slot1 output for feedback	*/
 	uint8   CON;		/* connection (algorithm) type	*/
 
diff --git a/engines/ultima/shared/std/misc.cpp b/engines/ultima/shared/std/misc.cpp
index b8a336d..748bc74 100644
--- a/engines/ultima/shared/std/misc.cpp
+++ b/engines/ultima/shared/std/misc.cpp
@@ -46,11 +46,11 @@ size_t strlen(const char *str) {
 	return ::strlen(str);
 }
 
-int toupper(int ch) {
+int toUpper(int ch) {
 	return ::toupper(ch);
 }
 
-int tolower(int ch) {
+int toLower(int ch) {
 	return ::tolower(ch);
 }
 
diff --git a/engines/ultima/shared/std/misc.h b/engines/ultima/shared/std/misc.h
index 5026791..b1a130a 100644
--- a/engines/ultima/shared/std/misc.h
+++ b/engines/ultima/shared/std/misc.h
@@ -44,8 +44,8 @@ extern int memcmp(const void *ptr1, const void *ptr2, size_t num);
 extern void *memcpy(void *destination, const void *source, size_t num);
 extern void strncpy(char *buffer, const char *src, size_t bufSize);
 extern size_t strlen(const char *str);
-extern int toupper(int ch);
-extern int tolower(int ch);
+extern int toUpper(int ch);
+extern int toLower(int ch);
 extern int strcmp(const char *leftStr, const char *rightStr);
 extern int strncmp(const char *str1, const char *str2, size_t n);
 extern long int strtol(const char *str, char **endptr, int base);
diff --git a/engines/ultima/shared/std/string.h b/engines/ultima/shared/std/string.h
index 9a8b589..c73c689 100644
--- a/engines/ultima/shared/std/string.h
+++ b/engines/ultima/shared/std/string.h
@@ -132,11 +132,11 @@ public:
 	/**
 	 * Append another string to this one
 	 */
-	void append(const string &str, size_t size = npos) {
-		if (size == npos)
+	void append(const string &str, size_t theSize = npos) {
+		if (theSize == npos)
 			*this += str;
 		else
-			*this += Common::String(str.c_str(), size);
+			*this += Common::String(str.c_str(), theSize);
 	}
 
 	/**
diff --git a/engines/ultima/ultima8/filesys/file_system.cpp b/engines/ultima/ultima8/filesys/file_system.cpp
index 88f487f..9b8b505 100644
--- a/engines/ultima/ultima8/filesys/file_system.cpp
+++ b/engines/ultima/ultima8/filesys/file_system.cpp
@@ -182,7 +182,7 @@ bool FileSystem::base_to_uppercase(string &str, int count) {
 		if (todo <= 0)
 			break;
 
-		*X = static_cast<char>(Std::toupper(*X));
+		*X = static_cast<char>(Std::toUpper(*X));
 	}
 	if (X == str.rend())
 		todo--; // start of pathname counts as separator too




More information about the Scummvm-git-logs mailing list