aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2019-04-24 18:05:46 +0200
committerUlf Hermann <[email protected]>2021-06-30 11:23:08 +0200
commit8635e5b300298c01ada7dc51bfca76c3f02bfc14 (patch)
treef7e797d9ab242c82659258ff4829a7e2a65ee1ed /src/qml/jsruntime/qv4numberobject.cpp
parent88e2b6316effd0a570b49e7e9f6f6378078c12a4 (diff)
Use QV4::Scope::hasException() where applicable
It is shorter and encapsulates the exception handling a bit. Change-Id: I8e2dc0eb3b930e222b8cb4852b73d99ca18a0379 Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 0044e0bc68..e758384a84 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -306,7 +306,7 @@ ReturnedValue NumberPrototype::method_toPrecision(const FunctionObject *b, const
{
Scope scope(b);
ScopedValue v(scope, thisNumberValue(scope.engine, thisObject));
- if (scope.engine->hasException)
+ if (scope.hasException())
return QV4::Encode::undefined();
double d = v->asDouble();
@@ -314,7 +314,7 @@ ReturnedValue NumberPrototype::method_toPrecision(const FunctionObject *b, const
return Encode(v->toString(scope.engine));
int precision = argv[0].toInt32();
- if (scope.engine->hasException)
+ if (scope.hasException())
return QV4::Encode::undefined();
if (std::isnan(d))