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/render/jobs/rendersyncjobs_p.h | |
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/render/jobs/rendersyncjobs_p.h')
-rw-r--r-- | src/render/jobs/rendersyncjobs_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/jobs/rendersyncjobs_p.h b/src/render/jobs/rendersyncjobs_p.h index 856126e24..2307e509f 100644 --- a/src/render/jobs/rendersyncjobs_p.h +++ b/src/render/jobs/rendersyncjobs_p.h @@ -112,8 +112,8 @@ public: rv->setMaterialParameterTable(dataCacheForLeaf.materialParameterGatherer); // Split among the ideal number of command builders - const int jobCount = m_renderViewCommandBuilderJobs.size(); - const int entityCount = entities.size(); + const int jobCount = int(m_renderViewCommandBuilderJobs.size()); + const int entityCount = int(entities.size()); const int idealPacketSize = std::min(std::max(10, entityCount / jobCount), entityCount); // Try to split work into an ideal number of workers const int m = findIdealNumberOfWorkers(entityCount, idealPacketSize, jobCount); @@ -319,7 +319,7 @@ public: { int totalCommandCount = 0; for (const RenderViewCommandBuilderJobPtrAlias &renderViewCommandBuilder : qAsConst(m_renderViewCommandBuilderJobs)) - totalCommandCount += renderViewCommandBuilder->commandData().size(); + totalCommandCount += int(renderViewCommandBuilder->commandData().size()); commandData.reserve(totalCommandCount); for (const RenderViewCommandBuilderJobPtrAlias &renderViewCommandBuilder : qAsConst(m_renderViewCommandBuilderJobs)) commandData += std::move(renderViewCommandBuilder->commandData()); @@ -439,8 +439,8 @@ public: } // Split among the number of command updaters - const int jobCount = m_renderViewCommandUpdaterJobs.size(); - const int commandCount = filteredCommandData->size(); + const int jobCount = int(m_renderViewCommandUpdaterJobs.size()); + const int commandCount = int(filteredCommandData->size()); const int idealPacketSize = std::min(std::max(10, commandCount), commandCount); const int m = findIdealNumberOfWorkers(commandCount, idealPacketSize, jobCount); |