Replace AString with std::string.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
bool ShouldFollowCSGOServerGuidelines() const { return m_bFollowCSGOServerGuidelines; }
|
||||
bool CanSetCSGOEntProp(const char *pszPropName) { return !ShouldFollowCSGOServerGuidelines() || !m_CSGOBadList.has(pszPropName); }
|
||||
private:
|
||||
ke::HashSet<ke::AString, detail::StringHashMapPolicy> m_CSGOBadList;
|
||||
ke::HashSet<std::string, detail::StringHashMapPolicy> m_CSGOBadList;
|
||||
bool m_bFollowCSGOServerGuidelines = false;
|
||||
#endif
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user