aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-06 13:41:29 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:18:06 +0000
commitb58711804e9cca641927dbdebe281488e475352b (patch)
treecb7671cb6edc52e5e744a370704ec068c7ab45eb /src/qml/jsruntime/qv4string_p.h
parent238b1cb1cb8915995b6dfe4e404f1771c62b3169 (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/qv4string_p.h')
-rw-r--r--src/qml/jsruntime/qv4string_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 72c4057b20..200d979f24 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -108,7 +108,7 @@ struct Q_QML_PRIVATE_EXPORT String : Base {
if (hashValue() != other->hashValue())
return false;
Q_ASSERT(subtype < StringType_Complex);
- if (identifier && identifier == other->identifier)
+ if (identifier.isValid() && identifier == other->identifier)
return true;
if (subtype == Heap::String::StringType_ArrayIndex && other->subtype == Heap::String::StringType_ArrayIndex)
return true;
@@ -119,7 +119,7 @@ struct Q_QML_PRIVATE_EXPORT String : Base {
bool startsWithUpper() const;
mutable QStringData *text;
- mutable Identifier *identifier;
+ mutable Identifier identifier;
mutable uint subtype;
mutable uint stringHash;
private:
@@ -192,7 +192,7 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed {
uint toUInt(bool *ok) const;
void makeIdentifier() const {
- if (d()->identifier)
+ if (d()->identifier.isValid())
return;
makeIdentifierImpl();
}
@@ -214,7 +214,7 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed {
bool startsWithUpper() const { return d()->startsWithUpper(); }
- Identifier *identifier() const { return d()->identifier; }
+ Identifier identifier() const { return d()->identifier; }
protected:
static bool isEqualTo(Managed *that, Managed *o);