DIRECTOR: replace whitespace trim with String::trim

This commit is contained in:
Roland van Laar 2020-07-21 20:48:11 +02:00
parent a7426c2872
commit b62a77f498

View File

@ -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;