Rewrote format() parser to be re-entrant and easier to read
Added various optimizations Fixed memory leak in sh_tinyhash
This commit is contained in:
@@ -59,13 +59,12 @@ public:
|
||||
defentry() : definition(NULL)
|
||||
{
|
||||
};
|
||||
defentry(const defentry &src)
|
||||
{
|
||||
definition = src.definition;
|
||||
}
|
||||
~defentry()
|
||||
{
|
||||
if (definition)
|
||||
{
|
||||
delete definition;
|
||||
definition = NULL;
|
||||
}
|
||||
}
|
||||
String *definition;
|
||||
};
|
||||
@@ -184,6 +183,8 @@ public:
|
||||
// When a language id in a format string in FormatAmxString is LANG_PLAYER, the glob id decides which language to take.
|
||||
void SetDefLang(int id);
|
||||
|
||||
inline int GetDefLang() const { return m_CurGlobId; }
|
||||
|
||||
// Reset
|
||||
void Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user