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:
David Anderson
2005-11-21 10:04:43 +00:00
parent f13599177f
commit c6fc34a64d
7 changed files with 269 additions and 276 deletions

View File

@@ -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();