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
+4 -5
View File
@@ -329,8 +329,6 @@ void BlocksRenderer::blockCube(
bool lights,
bool ao
) {
ubyte group = block.drawGroup;
glm::ivec3 X(1, 0, 0);
glm::ivec3 Y(0, 1, 0);
glm::ivec3 Z(0, 0, 1);
@@ -557,7 +555,7 @@ SortingMeshData BlocksRenderer::renderTranslucent(
y + 0.5f,
z + chunk->z * CHUNK_D + 0.5f
),
util::Buffer<float>(indexSize * CHUNK_VERTEX_SIZE)};
util::Buffer<float>(indexSize * CHUNK_VERTEX_SIZE), 0};
totalSize += entry.vertexData.size();
@@ -593,7 +591,8 @@ SortingMeshData BlocksRenderer::renderTranslucent(
sortingMesh.entries.size() > 1) {
SortingMeshEntry newEntry {
sortingMesh.entries[0].position,
util::Buffer<float>(totalSize)
util::Buffer<float>(totalSize),
0
};
size_t offset = 0;
for (const auto& entry : sortingMesh.entries) {
@@ -643,7 +642,7 @@ void BlocksRenderer::build(const Chunk* chunk, const Chunks* chunks) {
vertexOffset = 0;
indexOffset = indexSize = 0;
sortingMesh = std::move(renderTranslucent(voxels, beginEnds));
sortingMesh = renderTranslucent(voxels, beginEnds);
overflow = false;
vertexOffset = 0;