From da6ad0c31f84b18abd522367656842a9b319d0a8 Mon Sep 17 00:00:00 2001 From: Santos Date: Mon, 30 Sep 2024 18:54:49 +0100 Subject: [PATCH] fix(tesseratos): build and clang-tidy errors --- engine/include/cubos/engine/voxels/voxel_model.hpp | 2 +- engine/src/voxels/voxel_model.cpp | 4 ++-- tools/tesseratos/src/tesseratos/importer/plugin.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/include/cubos/engine/voxels/voxel_model.hpp b/engine/include/cubos/engine/voxels/voxel_model.hpp index c74e2b7c7..590aa8041 100644 --- a/engine/include/cubos/engine/voxels/voxel_model.hpp +++ b/engine/include/cubos/engine/voxels/voxel_model.hpp @@ -43,7 +43,7 @@ namespace cubos::engine /// @brief Constructs an empty VoxelModel VoxelModel() = default; - static constexpr uint32_t MAX_MATERIALS = 65536; + static constexpr uint32_t MaxMaterials = 65536; uint16_t getMatricesSize() const; diff --git a/engine/src/voxels/voxel_model.cpp b/engine/src/voxels/voxel_model.cpp index 8089b1c92..75015ad66 100644 --- a/engine/src/voxels/voxel_model.cpp +++ b/engine/src/voxels/voxel_model.cpp @@ -170,9 +170,9 @@ bool VoxelModel::loadFrom(Stream& stream) } if (mat == nextMat) { - if (mat >= MAX_MATERIALS) + if (mat >= MaxMaterials) { - CUBOS_ERROR("Too many materials, max is {}", MAX_MATERIALS); + CUBOS_ERROR("Too many materials, max is {}", MaxMaterials); return false; } diff --git a/tools/tesseratos/src/tesseratos/importer/plugin.cpp b/tools/tesseratos/src/tesseratos/importer/plugin.cpp index a4b84ed3b..9c12e0d49 100644 --- a/tools/tesseratos/src/tesseratos/importer/plugin.cpp +++ b/tools/tesseratos/src/tesseratos/importer/plugin.cpp @@ -219,7 +219,7 @@ static void showImport(Assets& assets, cubos::core::ecs::EventReader(state.gridCount); ++i) { char buffer[256]; - snprintf(buffer, sizeof(buffer), "Grid File Path %d:", i + 1); + snprintf(buffer, sizeof(buffer), "Grid File Path %lu:", i + 1); ImGui::Text("%s", buffer); char inputBuffer[256];