Replace AString with std::string.

This commit is contained in:
David Anderson
2020-05-20 17:57:18 -07:00
parent 301bafa3f5
commit b725196a26
45 changed files with 156 additions and 162 deletions
+4 -4
View File
@@ -399,13 +399,13 @@ SMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key
m_Offsets.replace(m_offset, atoi(value));
}
} else if (m_ParseState == PSTATE_GAMEDEFS_KEYS) {
ke::AString vstr(value);
std::string vstr(value);
m_Keys.replace(key, std::move(vstr));
}
else if (m_ParseState == PSTATE_GAMEDEFS_KEYS_PLATFORM) {
if (IsPlatformCompatible(key, &matched_platform))
{
ke::AString vstr(value);
std::string vstr(value);
m_Keys.replace(m_Key, std::move(vstr));
}
} else if (m_ParseState == PSTATE_GAMEDEFS_SUPPORTED) {
@@ -1001,10 +1001,10 @@ bool CGameConfig::GetOffset(const char *key, int *value)
const char *CGameConfig::GetKeyValue(const char *key)
{
StringHashMap<ke::AString>::Result r = m_Keys.find(key);
StringHashMap<std::string>::Result r = m_Keys.find(key);
if (!r.found())
return NULL;
return r->value.chars();
return r->value.c_str();
}
//memory addresses below 0x10000 are automatically considered invalid for dereferencing