summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-21 08:37:55 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-21 10:06:48 +0000
commitcf517b971a92cd62803906a1a864b2d3337449c0 (patch)
tree48101228d110d41c25bb5911935d37a5390d4ec4 /tools
parent052e60d67e87d40e8aea0dc132519319a5a40409 (diff)
Fix MSVC2015/64 compiler warnings in qgltf.
qgltf.cpp(2125): warning C4267: '=': conversion from 'size_t' to 'uint', possible loss of data qgltf.cpp(2135): warning C4267: '=': conversion from 'size_t' to 'uint', possible loss of data qgltf.cpp(2152): warning C4267: '=': conversion from 'size_t' to 'uint', possible loss of data qgltf.cpp(2170): warning C4267: '=': conversion from 'size_t' to 'uint', possible loss of data qgltf.cpp(2201): warning C4267: '=': conversion from 'size_t' to 'uint', possible loss of data Change-Id: I7d0f9054bd2736698ec6d13f6eff20180c3262cb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qgltf/qgltf.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qgltf/qgltf.cpp b/tools/qgltf/qgltf.cpp
index 2f8779e61..720a1737d 100644
--- a/tools/qgltf/qgltf.cpp
+++ b/tools/qgltf/qgltf.cpp
@@ -2122,7 +2122,7 @@ void GltfExporter::exportAnimations(QJsonObject &obj,
acc.count = ai.keyFrames.count();
acc.componentType = GLT_FLOAT;
acc.type = QStringLiteral("SCALAR");
- acc.offset = (p - base) * sizeof(float);
+ acc.offset = uint((p - base) * sizeof(float));
foreach (const Importer::KeyFrame &kf, ai.keyFrames)
*p++ = kf.t;
parameters["TIME"] = acc.name;
@@ -2132,7 +2132,7 @@ void GltfExporter::exportAnimations(QJsonObject &obj,
acc.name = newAccessorName();
acc.componentType = GLT_FLOAT;
acc.type = QStringLiteral("VEC3");
- acc.offset = (p - base) * sizeof(float);
+ acc.offset = uint((p - base) * sizeof(float));
QVector<float> lastV;
foreach (const Importer::KeyFrame &kf, ai.keyFrames) {
const QVector<float> *v = kf.transValid ? &kf.trans : &lastV;
@@ -2149,7 +2149,7 @@ void GltfExporter::exportAnimations(QJsonObject &obj,
acc.name = newAccessorName();
acc.componentType = GLT_FLOAT;
acc.type = QStringLiteral("VEC4");
- acc.offset = (p - base) * sizeof(float);
+ acc.offset = uint((p - base) * sizeof(float));
QVector<float> lastV;
foreach (const Importer::KeyFrame &kf, ai.keyFrames) {
const QVector<float> *v = kf.rotValid ? &kf.rot : &lastV;
@@ -2167,7 +2167,7 @@ void GltfExporter::exportAnimations(QJsonObject &obj,
acc.name = newAccessorName();
acc.componentType = GLT_FLOAT;
acc.type = QStringLiteral("VEC3");
- acc.offset = (p - base) * sizeof(float);
+ acc.offset = uint((p - base) * sizeof(float));
QVector<float> lastV;
foreach (const Importer::KeyFrame &kf, ai.keyFrames) {
const QVector<float> *v = kf.scaleValid ? &kf.scale : &lastV;
@@ -2198,7 +2198,7 @@ void GltfExporter::exportAnimations(QJsonObject &obj,
Importer::MeshInfo::BufferView bv;
bv.name = bvName;
bv.offset = buf.data.size();
- bv.length = (p - base) * sizeof(float);
+ bv.length = uint((p - base) * sizeof(float));
bv.componentType = GLT_FLOAT;
bvList << bv;
extraData.resize(bv.length);