aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-09 13:56:47 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-12 11:04:24 +0100
commitc10527b7c36a0c1ad49faaec5e4ea3dbb4f78b6c (patch)
tree8fe38a4f63953c1ace1c46b1d591ff45347ee974 /src/qml/jsruntime/qv4string_p.h
parent455d967025c0485c1dc0d817008de70cdbcd60dd (diff)
Remove the StringType_UInt subtype
It's not really used, and doesn't optimise anything really. Additionally get rid of some code duplication. Change-Id: I6502512e6df58db2c0264ea43d91a23c7585427c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4string_p.h')
-rw-r--r--src/qml/jsruntime/qv4string_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 86b8f2bdd5..8c3030b8e0 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -50,7 +50,6 @@ struct Q_QML_PRIVATE_EXPORT String : Base {
enum StringType {
StringType_Unknown,
StringType_Regular,
- StringType_UInt,
StringType_ArrayIndex
};
@@ -90,7 +89,7 @@ struct Q_QML_PRIVATE_EXPORT String : Base {
Q_ASSERT(!largestSubLength);
if (identifier && identifier == other->identifier)
return true;
- if (subtype >= Heap::String::StringType_UInt && subtype == other->subtype)
+ if (subtype == Heap::String::StringType_ArrayIndex && other->subtype == Heap::String::StringType_ArrayIndex)
return true;
return toQString() == other->toQString();
@@ -124,7 +123,9 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed {
IsString = true
};
- bool equals(String *other) const;
+ bool equals(String *other) const {
+ return d()->isEqualTo(other->d());
+ }
inline bool isEqualTo(const String *other) const {
return d()->isEqualTo(other->d());
}