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

rvanlaar roland at rolandvanlaar.nl
Tue Jul 21 18:49:54 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:
b62a77f498 DIRECTOR: replace whitespace trim with String::trim


Commit: b62a77f498c3f673c303d1d7eb0eab35bddc5188
    https://github.com/scummvm/scummvm/commit/b62a77f498c3f673c303d1d7eb0eab35bddc5188
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-07-21T20:48:43+02:00

Commit Message:
DIRECTOR: replace whitespace trim with String::trim

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 3409856514..05fb5a32e2 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -302,13 +302,8 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
 	debug(2, "pathMakeRelative(): s2 %s", convPath.c_str());
 
 	// Strip the leading whitespace from the path
-	if (initialPath.hasPrefix(" ")) {
-		Common::String newPath = "";
-		for (uint i = 1; i < initialPath.size(); i++)
-			newPath += initialPath[i];
-		initialPath = newPath;
-	}
-
+	initialPath.trim();
+	
 	if (f.open(initialPath))
 		return initialPath;
 




More information about the Scummvm-git-logs mailing list