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. Change-Id: Ica9a2f9738959adfa841270ffdd4893bd7d1d4e8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 37ba5e94d681c8d65b0e44a14b0e1595d072800e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6c2b076650
commit
194fa0dc02
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user