clang-tidy fixes

This commit is contained in:
Ashley Rogers 2025-06-13 16:05:40 -04:00
parent 65c5d3b370
commit 1fabf5b1bd
6 changed files with 13 additions and 27 deletions

View File

@ -1,7 +1,4 @@
#include <CesiumGltf/ImageAsset.h>
#include <CesiumUtility/Assert.h>
#include <fmt/format.h>
#include <cstddef>
#include <cstdint>

View File

@ -1,4 +1,6 @@
#include <CesiumGltf/ImageAsset.h>
#include <CesiumNativeTests/writeTga.h>
#include <CesiumUtility/Assert.h>
#include <fmt/format.h>

View File

@ -16,18 +16,14 @@
#include <CesiumRasterOverlays/RasterOverlayTileProvider.h>
#include <CesiumUtility/CreditSystem.h>
#include <CesiumUtility/IntrusivePointer.h>
#include <CesiumUtility/Result.h>
#include <CesiumUtility/joinToString.h>
#include <CesiumVectorData/GeoJsonDocument.h>
#include <CesiumVectorData/GeoJsonObject.h>
#include <CesiumVectorData/GeoJsonObjectTypes.h>
#include <CesiumVectorData/VectorRasterizer.h>
#include <CesiumVectorData/VectorStyle.h>
#include <fmt/format.h>
#include <glm/common.hpp>
#include <glm/ext/vector_int2.hpp>
#include <nonstd/expected.hpp>
#include <spdlog/logger.h>
#include <algorithm>
@ -572,7 +568,8 @@ GeoJsonDocumentRasterOverlay::createTileProvider(
pAssetAccessor,
pPrepareRendererResources,
pLogger,
options = this->_options](const std::shared_ptr<GeoJsonDocument>& result)
options =
this->_options](const std::shared_ptr<GeoJsonDocument>& result)
-> CreateTileProviderResult {
return IntrusivePointer<RasterOverlayTileProvider>(
new GeoJsonDocumentRasterOverlayTileProvider(

View File

@ -1,5 +1,3 @@
#include "CesiumVectorData/GeoJsonObjectTypes.h"
#include <CesiumAsync/AsyncSystem.h>
#include <CesiumAsync/IAssetAccessor.h>
#include <CesiumGeospatial/CartographicPolygon.h>
@ -29,7 +27,6 @@
#include <string>
#include <vector>
using namespace CesiumGeometry;
using namespace CesiumGeospatial;
using namespace CesiumUtility;

View File

@ -2,6 +2,7 @@
#include <CesiumVectorData/VectorStyle.h>
#include <cstdint>
#include <optional>
#include <random>
using namespace CesiumUtility;

View File

@ -56,8 +56,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
VectorRasterizer rasterizer(rect, asset);
@ -85,8 +84,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
CartographicPolygon triangle(std::vector<glm::dvec2>{
@ -112,8 +110,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
tile->channels = 4;
tile->bytesPerChannel = 1;
tile->pixelData.resize(
(size_t)(tile->width * tile->height * tile->channels *
tile->bytesPerChannel),
(size_t)(tile->width * tile->height * tile->channels * tile->bytesPerChannel),
std::byte{255});
VectorRasterizer rasterizer(
GlobeRectangle(
@ -148,8 +145,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
VectorRasterizer rasterizer(rect, asset);
@ -184,8 +180,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
VectorRasterizer rasterizer(rect2, asset);
@ -217,8 +212,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
VectorRasterizer rasterizer(rect, asset);
@ -294,8 +288,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
CartographicPolygon square(std::vector<glm::dvec2>{
@ -356,8 +349,7 @@ TEST_CASE("VectorRasterizer::rasterize benchmark") {
asset->channels = 4;
asset->bytesPerChannel = 1;
asset->pixelData.resize(
(size_t)(asset->width * asset->height * asset->channels *
asset->bytesPerChannel),
(size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel),
std::byte{255});
for (int i = 0; i < 100; i++) {