From 5933627aa76011112d147cbe925b92e02ca2d0f0 Mon Sep 17 00:00:00 2001 From: HifiExperiments Date: Thu, 6 Jun 2024 17:11:10 -0700 Subject: [PATCH] a few more windows warnings --- libraries/graphics/src/graphics/Geometry.cpp | 2 +- libraries/script-engine/src/v8/FastScriptValueUtils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/graphics/src/graphics/Geometry.cpp b/libraries/graphics/src/graphics/Geometry.cpp index 3984863f1c..e46097207b 100644 --- a/libraries/graphics/src/graphics/Geometry.cpp +++ b/libraries/graphics/src/graphics/Geometry.cpp @@ -45,7 +45,7 @@ void Mesh::setVertexFormatAndStream(const gpu::Stream::FormatPointer& vf, const // We require meshes to have a color attribute. If they don't, we default to white. if (!_vertexFormat->hasAttribute(gpu::Stream::COLOR)) { - int channelNum = _vertexStream.getNumBuffers(); + gpu::Stream::Slot channelNum = (gpu::Stream::Slot)_vertexStream.getNumBuffers(); _vertexFormat->setAttribute(gpu::Stream::COLOR, channelNum, gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA), 0, gpu::Stream::PER_INSTANCE); _vertexStream.addBuffer(_colorBuffer, 0, _vertexFormat->getChannels().at(channelNum)._stride); } diff --git a/libraries/script-engine/src/v8/FastScriptValueUtils.cpp b/libraries/script-engine/src/v8/FastScriptValueUtils.cpp index d1545e60cb..d45b01b303 100644 --- a/libraries/script-engine/src/v8/FastScriptValueUtils.cpp +++ b/libraries/script-engine/src/v8/FastScriptValueUtils.cpp @@ -56,7 +56,7 @@ bool qBytearrayFromScriptValue(const ScriptValue& object, QByteArray &qByteArray return false; } v8::Local arrayBuffer = v8::Local::Cast(v8Value); - qByteArray.resize(arrayBuffer->ByteLength()); + qByteArray.resize((int)arrayBuffer->ByteLength()); memcpy(qByteArray.data(), arrayBuffer->Data(), arrayBuffer->ByteLength()); return true; }