summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qsimplex_p.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-07-23 21:26:35 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-07-27 14:58:41 +0200
commit8e0c2d7d22141ea391f99a85a6f6557a07a4eb52 (patch)
treebebe08098d5442367ffe12fce99b8c2868714fac /src/widgets/graphicsview/qsimplex_p.cpp
parent18113e22e92a7b8d759fd0f9c9d696ee7e97a849 (diff)
Fix various -Wdeprecated-enum-float-conversions around the code
In two cases, it was as easy as replacing an unnamed enum's values with constexpr variables. In the case of QSimplex, I opted for qToUnderlying(), as the enum made sense on its own. Change-Id: Ifcf5be14bd2f35e50adabdbd7ecdb2e83f6bf5b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/graphicsview/qsimplex_p.cpp')
-rw-r--r--src/widgets/graphicsview/qsimplex_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qsimplex_p.cpp b/src/widgets/graphicsview/qsimplex_p.cpp
index 38c2df5fc6..b9f7275d00 100644
--- a/src/widgets/graphicsview/qsimplex_p.cpp
+++ b/src/widgets/graphicsview/qsimplex_p.cpp
@@ -551,7 +551,7 @@ qreal QSimplex::solver(SolverFactor factor)
// Return the value calculated by the simplex plus the value of the
// fixed variables.
- return (factor * valueAt(0, columns - 1)) + resultOffset;
+ return (qToUnderlying(factor) * valueAt(0, columns - 1)) + resultOffset;
}
/*!