Inline identifier lookup where it makes sense
Change-Id: I42ac6f4232fec2ce1535a007007542d8cc116433 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
This commit is contained in:
parent
0dbc19bc80
commit
036d1bcde9
|
@ -135,7 +135,7 @@ String *IdentifierTable::insertString(const QString &s)
|
|||
}
|
||||
|
||||
|
||||
Identifier *IdentifierTable::identifier(String *str)
|
||||
Identifier *IdentifierTable::identifierImpl(String *str)
|
||||
{
|
||||
if (str->identifier)
|
||||
return str->identifier;
|
||||
|
|
|
@ -68,10 +68,17 @@ public:
|
|||
|
||||
String *insertString(const QString &s);
|
||||
|
||||
Identifier *identifier(String *str);
|
||||
Identifier *identifier(String *str) {
|
||||
if (str->identifier)
|
||||
return str->identifier;
|
||||
return identifierImpl(str);
|
||||
}
|
||||
|
||||
Identifier *identifier(const QString &s);
|
||||
Identifier *identifier(const char *s, int len);
|
||||
|
||||
Identifier *identifierImpl(String *str);
|
||||
|
||||
void mark() {
|
||||
for (int i = 0; i < alloc; ++i)
|
||||
if (entries[i])
|
||||
|
|
Loading…
Reference in New Issue