Skip to content

Commit 85a6b15

Browse files
committed
Warning fixes
1 parent dff34ce commit 85a6b15

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/app/vsgdepthpeeling/vsgdepthpeeling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ vsg::ref_ptr<vsg::Group> createScene(vsg::oit::depthpeeling::Builder& builder, v
144144
for (auto y = -3; y <= 3; ++y, ++object)
145145
{
146146
scene->addChild(createBox(
147-
builder, texture, colors[object % colors.size()], vsg::vec3(x * 1.5, y * 1.5, z * 1.5)));
147+
builder, texture, colors[object % colors.size()], vsg::vec3(static_cast<float>(x) * 1.5f, static_cast<float>(y) * 1.5f, static_cast<float>(z) * 1.5f)));
148148
}
149149
}
150150
}

examples/state/vsgsampler/vsgsampler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int main(int argc, char** argv)
224224
{
225225
auto mipmapLayout = image->getMipmapLayout();
226226
auto [width, height, depth, numLayers] = image->pixelExtents();
227-
vsg::vec2 extents(width, height);
227+
vsg::vec2 extents(static_cast<float>(width), static_cast<float>(height));
228228

229229
// default mipmap settings
230230
{

examples/utils/vsghighlight/vsghighlight.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace
7474
auto indexes = vsg::ushortArray::create({0, 1, 2, 2, 3, 0});
7575
draw->assignArrays(vsg::DataList{points, normals});
7676
draw->assignIndices(indexes);
77-
draw->indexCount = indexes->size();
77+
draw->indexCount = static_cast<uint32_t>(indexes->size());
7878
draw->instanceCount = 1;
7979
out->addChild(draw);
8080

@@ -270,8 +270,8 @@ int main(int argc, char** argv)
270270
vsg::dquat yRot(vsg::radians(30.0), vsg::dvec3(0.0, 1.0, 0.0));
271271
auto dLight = vsg::DirectionalLight::create();
272272
dLight->name = "directional";
273-
dLight->color = {1.0, 1.0, 1.0};
274-
dLight->intensity = 0.8;
273+
dLight->color = {1.0f, 1.0f, 1.0f};
274+
dLight->intensity = 0.8f;
275275
dLight->direction = xRot * yRot * vsg::dvec3(0.0, 0.0, -1.0);
276276
absoluteTransform->addChild(dLight);
277277
}

0 commit comments

Comments
 (0)