fix compiler warnings (GCC + Clang)

This commit is contained in:
MihailRis
2025-03-20 22:04:29 +03:00
parent 6c3d2d0907
commit 3d22de761f
50 changed files with 80 additions and 103 deletions
+5 -1
View File
@@ -437,7 +437,6 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) {
std::memset(voxels, 0, sizeof(voxel) * CHUNK_VOL);
const auto& indices = content.getIndices()->blocks;
const auto& biomes = prototype.biomes.get();
for (uint z = 0; z < CHUNK_D; z++) {
for (uint x = 0; x < CHUNK_W; x++) {
@@ -456,6 +455,7 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) {
generatePlacements(prototype, voxels, chunkX, chunkZ);
generatePlants(prototype, values, voxels, chunkX, chunkZ, biomes);
[[maybe_unused]] const auto& indices = content.getIndices()->blocks;
for (uint i = 0; i < CHUNK_VOL; i++) {
blockid_t& id = voxels[i].id;
if (id == BLOCK_STRUCT_AIR) {
@@ -609,3 +609,7 @@ WorldGenDebugInfo WorldGenerator::createDebugInfo() const {
std::move(values)
};
}
uint64_t WorldGenerator::getSeed() const {
return seed;
}