fix compiler warnings (GCC + Clang)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
VoxelStructure::VoxelStructure(
|
||||
VoxelStructureMeta meta,
|
||||
std::unique_ptr<VoxelFragment> structure
|
||||
) : fragments({std::move(structure)}), meta(std::move(meta)) {}
|
||||
) : meta(std::move(meta)), fragments({std::move(structure)}) {}
|
||||
|
||||
GeneratorDef::GeneratorDef(std::string name)
|
||||
: name(std::move(name)), caption(util::id_to_caption(name)) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -134,4 +134,6 @@ public:
|
||||
void generate(voxel* voxels, int x, int z);
|
||||
|
||||
WorldGenDebugInfo createDebugInfo() const;
|
||||
|
||||
uint64_t getSeed() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user