2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

ProjectPath hashing fix

This commit is contained in:
Jack Andersen
2016-08-28 14:28:24 -10:00
parent 8c8a143f6b
commit 07c21ec489
2 changed files with 22 additions and 33 deletions

View File

@@ -78,21 +78,8 @@ void ProjectPath::assign(Database::Project& project, const SystemString& path)
m_absPath = project.getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath;
SanitizePath(m_relPath);
SanitizePath(m_absPath);
#if HECL_UCS2
m_utf8AbsPath = WideToUTF8(m_absPath);
m_utf8RelPath = WideToUTF8(m_relPath);
m_utf8AuxInfo = WideToUTF8(m_auxInfo);
if (m_utf8AuxInfo.size())
m_hash = Hash(m_utf8RelPath + '|' + m_utf8AuxInfo);
else
m_hash = Hash(m_utf8RelPath);
#else
if (m_auxInfo.size())
m_hash = Hash(m_relPath + '|' + m_auxInfo);
else
m_hash = Hash(m_relPath);
#endif
ComputeHash();
}
#if HECL_UCS2
@@ -122,20 +109,7 @@ void ProjectPath::assign(const ProjectPath& parentPath, const SystemString& path
SanitizePath(m_relPath);
SanitizePath(m_absPath);
#if HECL_UCS2
m_utf8AbsPath = WideToUTF8(m_absPath);
m_utf8RelPath = WideToUTF8(m_relPath);
m_utf8AuxInfo = WideToUTF8(m_auxInfo);
if (m_utf8AuxInfo.size())
m_hash = Hash(m_utf8RelPath + '|' + m_utf8AuxInfo);
else
m_hash = Hash(m_utf8RelPath);
#else
if (m_auxInfo.size())
m_hash = Hash(m_relPath + '|' + m_auxInfo);
else
m_hash = Hash(m_relPath);
#endif
ComputeHash();
}
#if HECL_UCS2