diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-07-24 22:32:38 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-04 20:16:58 +0100 |
commit | 43296bb5fb578cc64b14fb4480e6daa87bb6491d (patch) | |
tree | 6978a08c377bd1c073107496b78a2ad27036eee4 /src/qml/jsruntime/qv4regexp.cpp | |
parent | 6b7c3ea49c3475a71c582dd8c4a54429e543ec1c (diff) |
Remove some unneeded reinterpret_cast's
Change-Id: I29ebc1f06bb3f0d20e6e21840c7fe326a0f4546d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexp.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4regexp.cpp b/src/qml/jsruntime/qv4regexp.cpp index ed672892c2..4c33424f0b 100644 --- a/src/qml/jsruntime/qv4regexp.cpp +++ b/src/qml/jsruntime/qv4regexp.cpp @@ -63,14 +63,14 @@ uint RegExp::match(const QString &string, int start, uint *matchOffsets) return JSC::Yarr::interpret(byteCode().get(), s.characters16(), string.length(), start, matchOffsets); } -RegExp* RegExp::create(ExecutionEngine* engine, const QString& pattern, bool ignoreCase, bool multiline) +Returned<RegExp> *RegExp::create(ExecutionEngine* engine, const QString& pattern, bool ignoreCase, bool multiline) { RegExpCacheKey key(pattern, ignoreCase, multiline); RegExpCache *cache = engine->regExpCache; if (cache) { if (RegExp *result = cache->value(key)) - return result; + return Returned<RegExp>::create(result); } Scope scope(engine); @@ -82,7 +82,7 @@ RegExp* RegExp::create(ExecutionEngine* engine, const QString& pattern, bool ign result->d()->cache = cache; cache->insert(key, result); - return result; + return result.asReturned(); } RegExp::Data::Data(ExecutionEngine* engine, const QString &pattern, bool ignoreCase, bool multiline) |