De-const the members of QHypotHelper to enable assignment operators
Being able to iterate h = h.add(next) over a sequence of numbers makes
it possible to implement arbitrarily-many parameter functions that
need hypot, e.g. the implementation of V4's Math.hypot().
This amends commit b08368d99f.
Change-Id: I76bb65bd5f318e915d42fa4c935129850e258132
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
bb10
parent
dca74b45a3
commit
9505bd84db
|
|
@ -143,7 +143,7 @@ struct QHypotType { using type = decltype(std::hypot(R(1), F(1))); };
|
|||
template <typename T>
|
||||
class QHypotHelper
|
||||
{
|
||||
const T scale, total;
|
||||
T scale, total;
|
||||
template <typename F> friend class QHypotHelper;
|
||||
QHypotHelper(T first, T prior) : scale(first), total(prior) {}
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue