diff options
-rw-r--r-- | src/qml/jsruntime/qv4arraydata.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index b9c0e12305..b33b34ee08 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -662,14 +662,13 @@ void ArrayData::insert(Object *o, uint index, const Value *v, bool isAccessor) class ArrayElementLessThan { public: - inline ArrayElementLessThan(ExecutionEngine *engine, Object *thisObject, const Value &comparefn) - : m_engine(engine), thisObject(thisObject), m_comparefn(comparefn) {} + inline ArrayElementLessThan(ExecutionEngine *engine, const Value &comparefn) + : m_engine(engine), m_comparefn(comparefn) {} bool operator()(Value v1, Value v2) const; private: ExecutionEngine *m_engine; - Object *thisObject; const Value &m_comparefn; }; @@ -842,7 +841,7 @@ void ArrayData::sort(ExecutionEngine *engine, Object *thisObject, const Value &c } - ArrayElementLessThan lessThan(engine, thisObject, static_cast<const FunctionObject &>(comparefn)); + ArrayElementLessThan lessThan(engine, static_cast<const FunctionObject &>(comparefn)); Value *begin = thisObject->arrayData()->values.values; sortHelper(begin, begin + len, *begin, lessThan); |