diff options
| author | Lars Knoll <lars.knoll@qt.io> | 2017-10-20 16:54:10 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 09:00:44 +0000 |
| commit | bc5ff76e5afe6356bebb344c9a5d8b304e852f3c (patch) | |
| tree | 436e4cfdcad3ec2e882c300c85395fdeee3a4d48 /src/qml/jsruntime/qv4stringobject.cpp | |
| parent | 9b25000cb41b97c9c9f49a542c9b82cf25c032db (diff) | |
Simplify JSCallData construction
Change-Id: Ic53532edae9a209aa7125af6f00a9d993d74f1a3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 11fdcae6f8..d8bd51ac39 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -583,7 +583,7 @@ ReturnedValue StringPrototype::method_replace(const BuiltinFunction *b, CallData if (!!searchCallback) { result.reserve(string.length() + 10*numStringMatches); ScopedValue entry(scope); - JSCallData jsCallData(scope, searchCallback, numCaptures + 2); + JSCallData jsCallData(scope, numCaptures + 2); jsCallData->thisObject = Primitive::undefinedValue(); int lastEnd = 0; for (int i = 0; i < numStringMatches; ++i) { @@ -644,9 +644,9 @@ ReturnedValue StringPrototype::method_search(const BuiltinFunction *b, CallData RegExpObject *regExp = regExpObj->as<RegExpObject>(); if (!regExp) { - JSCallData jsCallDataData(scope, scope.engine->regExpCtor(), 1); - jsCallDataData->args[0] = regExpObj; - regExpObj = scope.engine->regExpCtor()->callAsConstructor(jsCallDataData); + JSCallData jsCallData(scope, 1); + jsCallData->args[0] = regExpObj; + regExpObj = scope.engine->regExpCtor()->callAsConstructor(jsCallData); if (scope.engine->hasException) return QV4::Encode::undefined(); |
