From 4c22baebfb07dd9c8aeb34b47044e07fea473d69 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Tue, 9 Jan 2024 13:13:51 -0500 Subject: [PATCH] Add size_t casts --- CesiumGltf/test/TestAccessorUtility.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CesiumGltf/test/TestAccessorUtility.cpp b/CesiumGltf/test/TestAccessorUtility.cpp index e94b62281..7d63b4935 100644 --- a/CesiumGltf/test/TestAccessorUtility.cpp +++ b/CesiumGltf/test/TestAccessorUtility.cpp @@ -418,7 +418,8 @@ TEST_CASE("Test IndicesForFaceFromAccessor") { REQUIRE(model.accessors.size() > 0); IndexAccessorType indexAccessor = AccessorView(model, model.accessors[0]); - const size_t numFaces = std::visit(CountFromAccessor{}, indexAccessor) / 3; + const size_t numFaces = + static_cast(std::visit(CountFromAccessor{}, indexAccessor) / 3); for (size_t i = 0; i < numFaces; i++) { auto indicesForFace = std::visit( @@ -439,7 +440,8 @@ TEST_CASE("Test IndicesForFaceFromAccessor") { REQUIRE(model.accessors.size() > 1); IndexAccessorType indexAccessor = AccessorView(model, model.accessors[1]); - const size_t numFaces = std::visit(CountFromAccessor{}, indexAccessor) - 2; + const size_t numFaces = + static_cast(std::visit(CountFromAccessor{}, indexAccessor) - 2); for (size_t i = 0; i < numFaces; i++) { auto indicesForFace = std::visit( IndicesForFaceFromAccessor{ @@ -459,7 +461,8 @@ TEST_CASE("Test IndicesForFaceFromAccessor") { REQUIRE(model.accessors.size() > 1); IndexAccessorType indexAccessor = AccessorView(model, model.accessors[1]); - const size_t numFaces = std::visit(CountFromAccessor{}, indexAccessor) - 2; + const size_t numFaces = + static_cast(std::visit(CountFromAccessor{}, indexAccessor) - 2); for (size_t i = 0; i < numFaces; i++) { auto indicesForFace = std::visit( IndicesForFaceFromAccessor{