diff options
Diffstat (limited to 'sources/shiboken6/tests/libother/number.cpp')
-rw-r--r-- | sources/shiboken6/tests/libother/number.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sources/shiboken6/tests/libother/number.cpp b/sources/shiboken6/tests/libother/number.cpp index c21c7c086..fbf50dc4a 100644 --- a/sources/shiboken6/tests/libother/number.cpp +++ b/sources/shiboken6/tests/libother/number.cpp @@ -2,33 +2,27 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "number.h" -#include <cstring> -#include <sstream> -using namespace std; +#include <sstream> -Str -Number::toStr() const +Str Number::toStr() const { - ostringstream in; + std::ostringstream in; in << m_value; return in.str().c_str(); } -Point -operator*(const Point& p, const Number& n) +Point operator*(const Point &p, const Number &n) { - return Point(p.x() * n.value(), p.y() * n.value()); + return {p.x() * n.value(), p.y() * n.value()}; } -Complex -Number::toComplex() const +Complex Number::toComplex() const { return Complex(m_value); } -Number -Number::fromComplex(Complex cpx) +Number Number::fromComplex(Complex cpx) { return Number(cpx.real()); } |