diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2023-05-11 13:29:31 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2023-05-11 20:05:10 +0200 |
| commit | f2f3400384deebec9bc6a1197654b840e90b7cd2 (patch) | |
| tree | 62b5755c2c87d91c53e4586b2a256e8e94d5ad5e /src/qml/jsruntime/qv4math_p.h | |
| parent | bedd590de4b71ac466d7197a98a8315d491d527a (diff) | |
Replace {add,sub,mul}_overload with q{Add,Sub,Mul}Overload
These APIs started out as private APIs in qnumeric_p.h, but have since
been made pseudo-public in qnumeric.h. The qnumeric_p.h versions just
forward to the qnumeric.h ones, so just use the latter.
This is in preparation of removing the {add,sub,mul}_overflow
versions, which, despite being defined in the unnamed namespace, don't
sport the q prefix, so potentially clash with global symbols.
The change is a simple textual search and replace.
Picking to 6.5 to avoid cherry-pick conflicts going forward.
Pick-to: 6.5
Change-Id: I2525619c14cb8eeadd08e2fa6c35968bcedd5171
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4math_p.h')
| -rw-r--r-- | src/qml/jsruntime/qv4math_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4math_p.h b/src/qml/jsruntime/qv4math_p.h index 2692c2617b..b12990700d 100644 --- a/src/qml/jsruntime/qv4math_p.h +++ b/src/qml/jsruntime/qv4math_p.h @@ -34,7 +34,7 @@ namespace QV4 { static inline QMLJS_READONLY ReturnedValue add_int32(int a, int b) { int result; - if (Q_UNLIKELY(add_overflow(a, b, &result))) + if (Q_UNLIKELY(qAddOverflow(a, b, &result))) return StaticValue::fromDouble(static_cast<double>(a) + b).asReturnedValue(); return StaticValue::fromInt32(result).asReturnedValue(); } @@ -42,7 +42,7 @@ static inline QMLJS_READONLY ReturnedValue add_int32(int a, int b) static inline QMLJS_READONLY ReturnedValue sub_int32(int a, int b) { int result; - if (Q_UNLIKELY(sub_overflow(a, b, &result))) + if (Q_UNLIKELY(qSubOverflow(a, b, &result))) return StaticValue::fromDouble(static_cast<double>(a) - b).asReturnedValue(); return StaticValue::fromInt32(result).asReturnedValue(); } @@ -50,7 +50,7 @@ static inline QMLJS_READONLY ReturnedValue sub_int32(int a, int b) static inline QMLJS_READONLY ReturnedValue mul_int32(int a, int b) { int result; - if (Q_UNLIKELY(mul_overflow(a, b, &result))) + if (Q_UNLIKELY(qMulOverflow(a, b, &result))) return StaticValue::fromDouble(static_cast<double>(a) * b).asReturnedValue(); // need to handle the case where one number is negative and the other 0 ==> -0 if (((a < 0) xor (b < 0)) && (result == 0)) |
