diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-01-28 17:01:59 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-01-29 07:58:27 +0000 |
commit | 498b39a5136bc13f20a9cf0b3c92e6a7ff796fb5 (patch) | |
tree | c125c5ab01b48bc70fbd4278bd580acd5e1d43e5 /src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp | |
parent | 2335abeaf994950a2420c33802b4cdd63dbc3323 (diff) |
Fix a number of MSVC int conversion warnings
- Port the qHash() functions to size_t
- Add some casts
- Adapt some types
Change-Id: Ib889d46dd56c1a1c4bf6b87ae1f756c188069180
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
(cherry picked from commit 05767abb7ef1b3c9c84633e53c29483510ba746d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp')
-rw-r--r-- | src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp index f997dfeeb..1650f8563 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/texturesubmissioncontext.cpp @@ -193,7 +193,7 @@ int TextureSubmissionContext::assignUnitForTexture(GLTexture *tex) for (size_t u=0; u<m_activeTextures.size(); ++u) { if (m_activeTextures[u].texture == tex) - return u; + return int(u); } for (size_t u=0; u<m_activeTextures.size(); ++u) { @@ -204,7 +204,7 @@ int TextureSubmissionContext::assignUnitForTexture(GLTexture *tex) int score = m_activeTextures[u].score; if (score < lowestScore) { lowestScore = score; - lowestScoredUnit = u; + lowestScoredUnit = int(u); } } } // of units iteration |