Fix consistency
This commit is contained in:
parent
c775cfca73
commit
9223989a01
|
@ -25,18 +25,18 @@
|
|||
template<>
|
||||
int Compare<ke::AString>(const ke::AString &k1, const ke::AString &k2)
|
||||
{
|
||||
return k1.compare(k2.chars());
|
||||
return k1.compare(k2);
|
||||
}
|
||||
|
||||
template<>
|
||||
int CompareAlt<char const *, ke::AString>(char const * const &k1, ke::AString const &k2)
|
||||
{
|
||||
return strcmp(k1, k2.chars());
|
||||
return k2.compare(k1);
|
||||
}
|
||||
template<>
|
||||
int CompareAlt<ke::AString, ke::AString>(ke::AString const &k1, ke::AString const &k2)
|
||||
{
|
||||
return strcmp(k1.chars(), k2.chars());
|
||||
return k1.compare(k2);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
|
@ -112,14 +112,16 @@ const char *translate(AMX *amx, cell amxaddr, const char *key)
|
|||
|
||||
if (def == NULL)
|
||||
{
|
||||
if (debug)
|
||||
if (debug && status == ERR_BADLANG)
|
||||
{
|
||||
ke::AString lang(pLangName);
|
||||
|
||||
if (status == ERR_BADLANG && (BadLang_Table.AltFindOrInsert(ke::Move(lang)).last + 120.0f < gpGlobals->time))
|
||||
lang_err &err = BadLang_Table.AltFindOrInsert(ke::Move(lang));
|
||||
|
||||
if (err.last + 120.0f < gpGlobals->time)
|
||||
{
|
||||
AMXXLOG_Error("[AMXX] Language \"%s\" not found", pLangName);
|
||||
BadLang_Table.AltFindOrInsert(ke::Move(lang)).last = gpGlobals->time;
|
||||
err.last = gpGlobals->time;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ public:
|
|||
{
|
||||
if (hashbucket->at(i) == hash)
|
||||
{
|
||||
if (key.compare(keybucket->at(i).chars()) == 0)
|
||||
if (key.compare(keybucket->at(i)) == 0)
|
||||
{
|
||||
return &(m_DataBuckets[bucketnum].at(i));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user