1
0
forked from mirrors/0ad

# Slightly tidied up string code.

CStr: Indented comments more consistently. Made some parameters
pass-by-reference, made some others not. Removed some useless methods -
Length (use length or empty), GetSubstring (use substr), LCase/UCase
(use LowerCase/UpperCase). Removed operator[] bounds-checking because
VS2005 does that anyway.
Maybe fixed noncopyable warnings on VS2003.

This was SVN commit r4828.
This commit is contained in:
Ykkrosh
2007-02-01 14:46:14 +00:00
parent fb91d32d61
commit 8d0a7170f6
39 changed files with 299 additions and 345 deletions
+3 -3
View File
@@ -142,8 +142,8 @@ CModelDefPtr CMeshManager::GetMesh(const CStr& filename)
{
// Strip a three-letter file extension (if there is one) from the filename
CStr name;
if (filename.Length() > 4 && filename[filename.Length()-4] == '.')
name = filename.GetSubstring(0, filename.Length()-4);
if (filename.length() > 4 && filename[filename.length()-4] == '.')
name = filename.substr(0, filename.length()-4);
else
name = filename;
@@ -216,7 +216,7 @@ CModelDefPtr CMeshManager::GetMesh(const CStr& filename)
CStr cachedPmdVfsPath = "cache/";
cachedPmdVfsPath += realDaePath;
// Remove the .dae extension (which will certainly be there)
cachedPmdVfsPath = cachedPmdVfsPath.GetSubstring(0, cachedPmdVfsPath.Length()-4);
cachedPmdVfsPath = cachedPmdVfsPath.substr(0, cachedPmdVfsPath.length()-4);
// Add a _hash.pmd extension
cachedPmdVfsPath += "_";
cachedPmdVfsPath += hashString;