diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-11 09:15:54 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-12 15:04:20 +0000 |
commit | 8eb75c04275524b999499d82eb5e58a94ccd38e9 (patch) | |
tree | 4c98259d58de2d9229a3be567b48922b0377c8bb /src/render/frontend | |
parent | b5e39528e72655af98bd80b349821b24915739cc (diff) |
Correct use of std::numeric_limits::max
It requires #include <limits> and extra set of parentheses due to
windows.h max() macro.
Change-Id: Iee8cbc07c4434ce9b560ffff13ca7dd7c94a7af1
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/frontend')
-rw-r--r-- | src/render/frontend/qcuboidmesh.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/frontend/qcuboidmesh.cpp b/src/render/frontend/qcuboidmesh.cpp index 69ce2e310..42bd15888 100644 --- a/src/render/frontend/qcuboidmesh.cpp +++ b/src/render/frontend/qcuboidmesh.cpp @@ -445,7 +445,7 @@ QMeshDataPtr createCuboidMesh(float xExtent, const int xzIndices = 2 * 3 * (xzResolution.width() - 1) * (xzResolution.height() - 1); const int xyIndices = 2 * 3 * (xyResolution.width() - 1) * (xyResolution.height() - 1); const int indexCount = 2 * (yzIndices + xzIndices + xyIndices); - Q_ASSERT(indexCount < std::numeric_limits<quint16>::max()); + Q_ASSERT(indexCount < (std::numeric_limits<quint16>::max)()); QByteArray indexBytes; indexBytes.resize(indexCount * sizeof(quint16)); quint16* indices = reinterpret_cast<quint16*>(indexBytes.data()); |