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:
janwas
2011-03-23 13:36:20 +00:00
parent e39fb7d0de
commit dcd192cb60
147 changed files with 948 additions and 1003 deletions
+4 -4
View File
@@ -51,7 +51,7 @@ CSkeletonAnimManager::~CSkeletonAnimManager()
// doesn't refer to valid animation file
CSkeletonAnimDef* CSkeletonAnimManager::GetAnimation(const VfsPath& pathname)
{
VfsPath name = Path::ChangeExtension(pathname, L"");
VfsPath name = pathname.ChangeExtension(L"");
// Find if it's already been loaded
boost::unordered_map<VfsPath, CSkeletonAnimDef*>::iterator iter = m_Animations.find(name);
@@ -65,7 +65,7 @@ CSkeletonAnimDef* CSkeletonAnimManager::GetAnimation(const VfsPath& pathname)
if (psaFilename.empty())
{
LOGERROR(L"Could not load animation '%ls'", pathname.c_str());
LOGERROR(L"Could not load animation '%ls'", pathname.string().c_str());
def = NULL;
}
else
@@ -81,9 +81,9 @@ CSkeletonAnimDef* CSkeletonAnimManager::GetAnimation(const VfsPath& pathname)
}
if (def)
LOGMESSAGE(L"CSkeletonAnimManager::GetAnimation(%ls): Loaded successfully", pathname.c_str());
LOGMESSAGE(L"CSkeletonAnimManager::GetAnimation(%ls): Loaded successfully", pathname.string().c_str());
else
LOGERROR(L"CSkeletonAnimManager::GetAnimation(%ls): Failed loading, marked file as bad", pathname.c_str());
LOGERROR(L"CSkeletonAnimManager::GetAnimation(%ls): Failed loading, marked file as bad", pathname.string().c_str());
// Add to map
m_Animations[name] = def; // NULL if failed to load - we won't try loading it again