diff options
author | Volker Hilsheimer <[email protected]> | 2024-06-10 15:21:45 +0200 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2024-06-10 21:57:27 +0200 |
commit | 37ba5e94d681c8d65b0e44a14b0e1595d072800e (patch) | |
tree | a60cd3263adebd241d23793feeb97383a77f8b64 | |
parent | 69a661e88e6a7799799033030497086a9194caab (diff) |
Fix build error from signed/unsigned mismatch
When building for 32bit Android:
qcolorclut_p.h:45:31: error: comparison of integers of different signs:
'qsizetype' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
Q_ASSERT(table.size() == gridPointsX * gridPointsY * gridPointsZ * gridPointsW);
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix by casting the result of the multiplication explicitly to qsizetype.
Pick-to: 6.8
Change-Id: Ica9a2f9738959adfa841270ffdd4893bd7d1d4e8
Reviewed-by: Allan Sandfeld Jensen <[email protected]>
-rw-r--r-- | src/gui/painting/qcolorclut_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qcolorclut_p.h b/src/gui/painting/qcolorclut_p.h index d95e9701b7e..9cf8b6f2670 100644 --- a/src/gui/painting/qcolorclut_p.h +++ b/src/gui/painting/qcolorclut_p.h @@ -42,7 +42,7 @@ public: QColorVector apply(const QColorVector &v) const { - Q_ASSERT(table.size() == gridPointsX * gridPointsY * gridPointsZ * gridPointsW); + Q_ASSERT(table.size() == qsizetype(gridPointsX * gridPointsY * gridPointsZ * gridPointsW)); QColorVector frac; const float x = std::clamp(v.x, 0.0f, 1.0f) * (gridPointsX - 1); const float y = std::clamp(v.y, 0.0f, 1.0f) * (gridPointsY - 1); |