diff --git a/Cesium3DTilesSelection/src/EllipsoidTilesetLoader.cpp b/Cesium3DTilesSelection/src/EllipsoidTilesetLoader.cpp index 9c326a04e..3da44dcb3 100644 --- a/Cesium3DTilesSelection/src/EllipsoidTilesetLoader.cpp +++ b/Cesium3DTilesSelection/src/EllipsoidTilesetLoader.cpp @@ -178,11 +178,9 @@ EllipsoidTilesetLoader::createGeometry(const Tile& tile) const { static constexpr uint16_t resolution = 24; std::vector indices; - indices.reserve( - static_cast(6 * (resolution - 1) * (resolution - 1))); + indices.reserve(static_cast(6 * (resolution - 1) * (resolution - 1))); - std::vector vertices( - static_cast(resolution * resolution)); + std::vector vertices(static_cast(resolution * resolution)); std::vector normals(vertices.size()); const Ellipsoid& ellipsoid = _projection.getEllipsoid(); diff --git a/Cesium3DTilesSelection/test/TestTilesetContentManager.cpp b/Cesium3DTilesSelection/test/TestTilesetContentManager.cpp index 8e15c934b..521fdd68e 100644 --- a/Cesium3DTilesSelection/test/TestTilesetContentManager.cpp +++ b/Cesium3DTilesSelection/test/TestTilesetContentManager.cpp @@ -127,8 +127,8 @@ CesiumGltf::Model createGlobeGrid( glm::dvec3 max = min; std::vector positions; - indices.reserve(static_cast(6 * (width - 1) * (height - 1))); - positions.reserve(static_cast(width * height)); + indices.reserve(static_cast(6 * (width - 1) * (height - 1))); + positions.reserve(static_cast(width * height)); for (uint32_t y = 0; y < height; ++y) { for (uint32_t x = 0; x < width; ++x) { double longitude = beginPoint.longitude + x * dimension; diff --git a/CesiumAsync/src/InternalTimegm.cpp b/CesiumAsync/src/InternalTimegm.cpp index 48a363bea..cce0144b6 100644 --- a/CesiumAsync/src/InternalTimegm.cpp +++ b/CesiumAsync/src/InternalTimegm.cpp @@ -5,7 +5,6 @@ #include "InternalTimegm.h" -#include #include #include diff --git a/CesiumGeometry/src/QuadtreeRectangleAvailability.cpp b/CesiumGeometry/src/QuadtreeRectangleAvailability.cpp index 226cfd713..7e32e0ab2 100644 --- a/CesiumGeometry/src/QuadtreeRectangleAvailability.cpp +++ b/CesiumGeometry/src/QuadtreeRectangleAvailability.cpp @@ -22,7 +22,7 @@ QuadtreeRectangleAvailability::QuadtreeRectangleAvailability( uint32_t maximumLevel) noexcept : _tilingScheme(tilingScheme), _maximumLevel(maximumLevel), - _rootNodes(static_cast( + _rootNodes(static_cast( this->_tilingScheme.getRootTilesX() * this->_tilingScheme.getRootTilesY())) { for (uint32_t j = 0; j < this->_tilingScheme.getRootTilesY(); ++j) { diff --git a/CesiumGltf/src/Accessor.cpp b/CesiumGltf/src/Accessor.cpp index 741796a40..3b9b13fc7 100644 --- a/CesiumGltf/src/Accessor.cpp +++ b/CesiumGltf/src/Accessor.cpp @@ -4,7 +4,6 @@ #include -#include #include #include diff --git a/CesiumGltfReader/test/TestGltfReader.cpp b/CesiumGltfReader/test/TestGltfReader.cpp index 20d516d1a..3d54f9a55 100644 --- a/CesiumGltfReader/test/TestGltfReader.cpp +++ b/CesiumGltfReader/test/TestGltfReader.cpp @@ -747,7 +747,8 @@ TEST_CASE("GltfReader::loadGltf") { const CesiumGltf::Image& image = result.model->images[0]; CHECK(image.pAsset->width == 2048); CHECK(image.pAsset->height == 2048); - CHECK(image.pAsset->pixelData.size() == static_cast(2048 * 2048 * 4); + CHECK( + image.pAsset->pixelData.size() == static_cast(2048 * 2048 * 4)); CHECK(!result.model->buffers.empty()); for (const CesiumGltf::Buffer& buffer : result.model->buffers) { diff --git a/CesiumQuantizedMeshTerrain/src/QuantizedMeshLoader.cpp b/CesiumQuantizedMeshTerrain/src/QuantizedMeshLoader.cpp index fec3e89d6..f5090d676 100644 --- a/CesiumQuantizedMeshTerrain/src/QuantizedMeshLoader.cpp +++ b/CesiumQuantizedMeshTerrain/src/QuantizedMeshLoader.cpp @@ -340,7 +340,7 @@ static std::optional parseQuantizedMesh( meshView.octEncodedNormalBuffer = std::span( data.data() + readIndex, - static_cast(vertexCount * 2)); + static_cast(vertexCount * 2)); } else if (enableWaterMask && extensionID == 2) { // Water Mask if (extensionLength == 1) { @@ -735,7 +735,7 @@ static std::vector generateNormals( sizeof(float)); std::span outputPositions( reinterpret_cast(outputPositionsBuffer.data()), - static_cast((vertexCount + skirtVertexCount) * 3)); + static_cast((vertexCount + skirtVertexCount) * 3)); size_t positionOutputIndex = 0; const glm::dvec3 center( diff --git a/CesiumQuantizedMeshTerrain/test/TestQuantizedMeshContent.cpp b/CesiumQuantizedMeshTerrain/test/TestQuantizedMeshContent.cpp index f17585fc4..b071fb5c1 100644 --- a/CesiumQuantizedMeshTerrain/test/TestQuantizedMeshContent.cpp +++ b/CesiumQuantizedMeshTerrain/test/TestQuantizedMeshContent.cpp @@ -419,7 +419,7 @@ void checkGridMesh( int32_t v = 0; std::vector uvs; - uvs.reserve(static_cast(verticesWidth * verticesHeight)); + uvs.reserve(static_cast(verticesWidth * verticesHeight)); uint32_t positionIdx = 0; uint32_t idx = 0; for (uint32_t y = 0; y < verticesHeight; ++y) { @@ -596,7 +596,7 @@ static void checkGeneratedGridNormal( uint32_t verticesHeight) { uint32_t totalGridIndices = (verticesWidth - 1) * (verticesHeight - 1) * 6; std::vector expectedNormals( - static_cast(verticesWidth * verticesHeight)); + static_cast(verticesWidth * verticesHeight)); for (uint32_t i = 0; i < totalGridIndices; i += 3) { I id0 = indices[i]; I id1 = indices[i + 1]; @@ -1031,7 +1031,7 @@ TEST_CASE("Test converting quantized mesh to gltf with skirt") { uint8_t x = 0, y = 0; octEncode(normal, x, y); std::vector octNormals( - static_cast(verticesWidth * verticesHeight * 2)); + static_cast(verticesWidth * verticesHeight * 2)); for (size_t i = 0; i < octNormals.size(); i += 2) { octNormals[i] = std::byte(x); octNormals[i + 1] = std::byte(y); @@ -1073,7 +1073,8 @@ TEST_CASE("Test converting quantized mesh to gltf with skirt") { REQUIRE( static_cast(normals.size()) == - (static_cast(verticesWidth * verticesHeight + totalSkirtVerticesCount)); + (static_cast(verticesWidth * verticesHeight) + + totalSkirtVerticesCount)); for (int64_t i = 0; i < normals.size(); ++i) { REQUIRE(Math::equalsEpsilon(normals[i].x, normal.x, Math::Epsilon2)); REQUIRE(Math::equalsEpsilon(normals[i].y, normal.y, Math::Epsilon2)); @@ -1119,7 +1120,7 @@ TEST_CASE("Test converting ill-formed quantized mesh") { uint8_t x = 0, y = 0; octEncode(normal, x, y); std::vector octNormals( - static_cast(verticesWidth * verticesHeight * 2)); + static_cast(verticesWidth * verticesHeight * 2)); for (size_t i = 0; i < octNormals.size(); i += 2) { octNormals[i] = std::byte(x); octNormals[i + 1] = std::byte(y); diff --git a/CesiumRasterOverlays/test/TestQuadtreeRasterOverlayTileProvider.cpp b/CesiumRasterOverlays/test/TestQuadtreeRasterOverlayTileProvider.cpp index 98aa8d755..7a2ce1a83 100644 --- a/CesiumRasterOverlays/test/TestQuadtreeRasterOverlayTileProvider.cpp +++ b/CesiumRasterOverlays/test/TestQuadtreeRasterOverlayTileProvider.cpp @@ -96,7 +96,7 @@ class TestTileProvider : public QuadtreeRasterOverlayTileProvider { result.pImage->bytesPerChannel = 1; result.pImage->channels = 4; result.pImage->pixelData.resize( - static_cast(this->getWidth() * this->getHeight() * 4), + static_cast(this->getWidth() * this->getHeight() * 4), std::byte(tileID.level)); }