Skip to content

Commit

Permalink
fix(tesseratos): build and clang-tidy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Scarface1809 committed Sep 30, 2024
1 parent 04a7735 commit da6ad0c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine/include/cubos/engine/voxels/voxel_model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace cubos::engine
/// @brief Constructs an empty VoxelModel
VoxelModel() = default;

Check warning on line 44 in engine/include/cubos/engine/voxels/voxel_model.hpp

View check run for this annotation

Codecov / codecov/patch

engine/include/cubos/engine/voxels/voxel_model.hpp#L44

Added line #L44 was not covered by tests

static constexpr uint32_t MAX_MATERIALS = 65536;
static constexpr uint32_t MaxMaterials = 65536;

uint16_t getMatricesSize() const;

Expand Down
4 changes: 2 additions & 2 deletions engine/src/voxels/voxel_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ bool VoxelModel::loadFrom(Stream& stream)
}
if (mat == nextMat)

Check warning on line 171 in engine/src/voxels/voxel_model.cpp

View check run for this annotation

Codecov / codecov/patch

engine/src/voxels/voxel_model.cpp#L171

Added line #L171 was not covered by tests
{
if (mat >= MAX_MATERIALS)
if (mat >= MaxMaterials)

Check warning on line 173 in engine/src/voxels/voxel_model.cpp

View check run for this annotation

Codecov / codecov/patch

engine/src/voxels/voxel_model.cpp#L173

Added line #L173 was not covered by tests
{
CUBOS_ERROR("Too many materials, max is {}", MAX_MATERIALS);
CUBOS_ERROR("Too many materials, max is {}", MaxMaterials);
return false;

Check warning on line 176 in engine/src/voxels/voxel_model.cpp

View check run for this annotation

Codecov / codecov/patch

engine/src/voxels/voxel_model.cpp#L175-L176

Added lines #L175 - L176 were not covered by tests
}

Expand Down
2 changes: 1 addition & 1 deletion tools/tesseratos/src/tesseratos/importer/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static void showImport(Assets& assets, cubos::core::ecs::EventReader<AssetSelect
for (unsigned long i = 0; i < static_cast<unsigned long>(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];
Expand Down

0 comments on commit da6ad0c

Please sign in to comment.