diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-04-06 13:41:29 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-02 14:18:06 +0000 |
commit | b58711804e9cca641927dbdebe281488e475352b (patch) | |
tree | cb7671cb6edc52e5e744a370704ec068c7ab45eb /src/qml/jsruntime/qv4identifiertable_p.h | |
parent | 238b1cb1cb8915995b6dfe4e404f1771c62b3169 (diff) |
Use Identifier by value and don't new them anymore
Change-Id: Ib25c08027013217657beb2675dafa9a8c85cbaf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4identifiertable_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4identifiertable_p.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4identifiertable_p.h b/src/qml/jsruntime/qv4identifiertable_p.h index 0c8de01f71..dce270e337 100644 --- a/src/qml/jsruntime/qv4identifiertable_p.h +++ b/src/qml/jsruntime/qv4identifiertable_p.h @@ -78,21 +78,21 @@ public: Heap::String *insertString(const QString &s); - Identifier *identifier(const Heap::String *str) { - if (str->identifier) + Identifier identifier(const Heap::String *str) { + if (str->identifier.isValid()) return str->identifier; return identifierImpl(str); } - Identifier *identifier(const QV4::String *str) { + Identifier identifier(const QV4::String *str) { return identifier(str->d()); } - Identifier *identifier(const QString &s); - Identifier *identifier(const char *s, int len); + Identifier identifier(const QString &s); + Identifier identifier(const char *s, int len); - Identifier *identifierImpl(const Heap::String *str); + Identifier identifierImpl(const Heap::String *str); - Q_QML_PRIVATE_EXPORT Heap::String *stringFromIdentifier(const Identifier *i) const; + Q_QML_PRIVATE_EXPORT Heap::String *stringForId(Identifier i) const; void mark(MarkStack *markStack) { for (int i = 0; i < alloc; ++i) { |