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
+2 -2
View File
@@ -59,7 +59,7 @@ struct StringPolicy
{
return ke::FastHashCharSequence(key, strlen(key));
}
static inline bool matches(const char *find, const ke::AString &key)
static inline bool matches(const char *find, const std::string &key)
{
return key.compare(find) == 0;
}
@@ -89,7 +89,7 @@ struct WeaponIDPolicy
}
};
typedef ke::HashMap<ke::AString, ItemDefHashValue, StringPolicy> ClassnameMap;
typedef ke::HashMap<std::string, ItemDefHashValue, StringPolicy> ClassnameMap;
typedef ke::HashMap<int, ItemDefHashValue, IntegerPolicy> ItemIndexMap;
typedef ke::HashMap<SMCSWeapon, ItemDefHashValue, WeaponIDPolicy> WeaponIDMap;
+1 -1
View File
@@ -291,7 +291,7 @@ void CreateHashMaps()
int iLoadoutslot = node.pDef->GetDefaultLoadoutSlot();
ClassnameMap::Insert i = g_mapClassToDefIdx.findForAdd(classname);
g_mapClassToDefIdx.add(i, ke::AString(classname), ItemDefHashValue(iLoadoutslot, price, iWeaponID, iItemDefIdx, classname));
g_mapClassToDefIdx.add(i, std::string(classname), ItemDefHashValue(iLoadoutslot, price, iWeaponID, iItemDefIdx, classname));
ItemIndexMap::Insert x = g_mapDefIdxToClass.findForAdd(iItemDefIdx);
g_mapDefIdxToClass.add(x, iItemDefIdx, ItemDefHashValue(iLoadoutslot, price, iWeaponID, iItemDefIdx, classname));