From 28f422ebf516aefb34f1602aeef8f87432cc4fb9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 24 Jan 2014 22:11:16 +0100 Subject: Move ArrayElementLessThen to qv4arraydata.cpp This is the only place the class gets used. Change-Id: Iebb0cba7af30c1b2da68f67596c349d5e20c5053 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4sparsearray.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/qml/jsruntime/qv4sparsearray.cpp') diff --git a/src/qml/jsruntime/qv4sparsearray.cpp b/src/qml/jsruntime/qv4sparsearray.cpp index 7169f5c20e..ffd1adf98b 100644 --- a/src/qml/jsruntime/qv4sparsearray.cpp +++ b/src/qml/jsruntime/qv4sparsearray.cpp @@ -53,32 +53,6 @@ using namespace QV4; -bool ArrayElementLessThan::operator()(const SafeValue &v1, const SafeValue &v2) const -{ - Scope scope(m_context); - - if (v1.isUndefined() || v1.isEmpty()) - return false; - if (v2.isUndefined() || v2.isEmpty()) - return true; - ScopedObject o(scope, m_comparefn); - if (o) { - Scope scope(o->engine()); - ScopedValue result(scope); - ScopedCallData callData(scope, 2); - callData->thisObject = Primitive::undefinedValue(); - callData->args[0] = v1; - callData->args[1] = v2; - result = __qmljs_call_value(m_context, m_comparefn, callData); - - return result->toNumber() < 0; - } - ScopedString p1s(scope, v1.toString(m_context)); - ScopedString p2s(scope, v2.toString(m_context)); - return p1s->toQString() < p2s->toQString(); -} - - const SparseArrayNode *SparseArrayNode::nextNode() const { const SparseArrayNode *n = this; -- cgit v1.2.3