diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-12 10:52:52 +0100 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-03-12 10:17:32 +0000 |
commit | b5e39528e72655af98bd80b349821b24915739cc (patch) | |
tree | 62c57f5c32454420d0e689d2cdcd91040c3f76bc /src | |
parent | fad6a4ed38a52693fd4bbfbadd71458a27c96ad2 (diff) |
Fix MSVC warnings.
aspects\qabstractaspect.cpp(50) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
resources\qframeallocator.cpp(276) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data
resources\qframeallocator.cpp(284) : warning C4267: 'argument' : conversion from 'size_t' to 'uint', possible loss of data
qchangearbiter.cpp(108) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
qt3d/src/render/backend/jobs/renderviewjobutils_p.h(64) : warning C4099: 'Qt3D::Render::ShaderUniform' : type name first seen using 'struct' now seen using 'class'
Change-Id: I055f2021cbecf0765a811aedd87eb2cee97e6431
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/aspects/qabstractaspect.cpp | 2 | ||||
-rw-r--r-- | src/core/qchangearbiter.cpp | 2 | ||||
-rw-r--r-- | src/core/resources/qframeallocator.cpp | 4 | ||||
-rw-r--r-- | src/render/backend/jobs/renderviewjobutils_p.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 82a1065f9..05842ffa5 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE static QByteArray className(const QMetaObject &obj) { // note: class names are stored in static meta objects, thus the usage of fromRawData here is fine - return QByteArray::fromRawData(obj.className(), strlen(obj.className())); + return QByteArray::fromRawData(obj.className(), int(strlen(obj.className()))); } namespace Qt3D { diff --git a/src/core/qchangearbiter.cpp b/src/core/qchangearbiter.cpp index 1d111d642..c42223a20 100644 --- a/src/core/qchangearbiter.cpp +++ b/src/core/qchangearbiter.cpp @@ -105,7 +105,7 @@ void QChangeArbiter::initialize(QAbstractAspectJobManager *jobManager) void QChangeArbiter::distributeQueueChanges(QChangeQueue *changeQueue) { - for (int i = 0, n = changeQueue->size(); i < n; i++) { + for (int i = 0, n = int(changeQueue->size()); i < n; i++) { QSceneChangePtr& change = (*changeQueue)[i]; // Lookup which observers care about the subject this change came from // and distribute the change to them diff --git a/src/core/resources/qframeallocator.cpp b/src/core/resources/qframeallocator.cpp index cfa49c0cf..48f0e5bbc 100644 --- a/src/core/resources/qframeallocator.cpp +++ b/src/core/resources/qframeallocator.cpp @@ -273,7 +273,7 @@ void* QFrameAllocator::allocateRawMemory(size_t size) { Q_D(QFrameAllocator); Q_ASSERT(size <= d->m_maxObjectSize); - uint allocatorIndex = d->allocatorIndexFromSize(size); + uint allocatorIndex = d->allocatorIndexFromSize(uint(size)); return d->allocateAtChunk(allocatorIndex); } @@ -281,7 +281,7 @@ void QFrameAllocator::deallocateRawMemory(void* ptr, size_t size) { Q_D(QFrameAllocator); Q_ASSERT(size <= d->m_maxObjectSize); - uint allocatorIndex = d->allocatorIndexFromSize(size); + uint allocatorIndex = d->allocatorIndexFromSize(uint(size)); d->deallocateAtChunck(ptr, allocatorIndex); } diff --git a/src/render/backend/jobs/renderviewjobutils_p.h b/src/render/backend/jobs/renderviewjobutils_p.h index 19bf9f6ce..6c2f64562 100644 --- a/src/render/backend/jobs/renderviewjobutils_p.h +++ b/src/render/backend/jobs/renderviewjobutils_p.h @@ -61,7 +61,7 @@ class RenderTechnique; class RenderView; class Renderer; class ShaderDataManager; -class ShaderUniform; +struct ShaderUniform; class RenderShaderData; Q_AUTOTEST_EXPORT void setRenderViewConfigFromFrameGraphLeafNode(RenderView *rv, |