mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of strings/paths; allows safe+easy join via operator/ and convenient case-insensitive comparison via operator==, avoids NativePathFromString, similar to boost::filesystem) - NativePath -> OsPath - add hash and To/FromJSVal for Path - add TS_ASSERT_PATH_EQUALS - replace _wfopen_s with sys_OpenFile - remove obsolete SortFiles/Directories This was SVN commit r9107.
This commit is contained in:
@@ -40,7 +40,7 @@ CMeshManager::~CMeshManager()
|
||||
|
||||
CModelDefPtr CMeshManager::GetMesh(const VfsPath& pathname)
|
||||
{
|
||||
const VfsPath name = Path::ChangeExtension(pathname, L"");
|
||||
const VfsPath name = pathname.ChangeExtension(L"");
|
||||
|
||||
// Find the mesh if it's already been loaded and cached
|
||||
mesh_map::iterator iter = m_MeshMap.find(name);
|
||||
@@ -53,7 +53,7 @@ CModelDefPtr CMeshManager::GetMesh(const VfsPath& pathname)
|
||||
|
||||
if (pmdFilename.empty())
|
||||
{
|
||||
LOGERROR(L"Could not load mesh '%ls'", pathname.c_str());
|
||||
LOGERROR(L"Could not load mesh '%ls'", pathname.string().c_str());
|
||||
return CModelDefPtr();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ CModelDefPtr CMeshManager::GetMesh(const VfsPath& pathname)
|
||||
}
|
||||
catch (PSERROR_File&)
|
||||
{
|
||||
LOGERROR(L"Could not load mesh '%ls'", pathname.c_str());
|
||||
LOGERROR(L"Could not load mesh '%ls'", pathname.string().c_str());
|
||||
return CModelDefPtr();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user