summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-12-12 20:22:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-12-12 20:22:09 +0100
commit3a53c6ede79835c5711bda3a332995f2407f5d12 (patch)
treeb069f892660f20ae389e2ebf565c0bae1d38a604
parentafc63fbba0e6009ec4132922545335594a20493e (diff)
cc
-rw-r--r--editor/wall-editor.cpp1
-rw-r--r--loader/wall-atlas.cpp2
-rw-r--r--src/chunk-walls.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/editor/wall-editor.cpp b/editor/wall-editor.cpp
index eba9dc66..99a5bd22 100644
--- a/editor/wall-editor.cpp
+++ b/editor/wall-editor.cpp
@@ -77,6 +77,7 @@ void wall_editor::place_tile(world& w, global_coords coords, const std::shared_p
{
case rotation::N: t.wall_north() = { atlas, (uint8_t)-1 }; break;
case rotation::W: t.wall_west() = { atlas, (uint8_t)-1 }; break;
+ default: CORRADE_ASSUME(false);
}
}
diff --git a/loader/wall-atlas.cpp b/loader/wall-atlas.cpp
index 026bd6d5..2e4d3704 100644
--- a/loader/wall-atlas.cpp
+++ b/loader/wall-atlas.cpp
@@ -86,7 +86,7 @@ std::shared_ptr<class wall_atlas> loader_impl::wall_atlas(StringView name, bool
return make_invalid_wall_atlas().atlas;
}
fm_assert(it->second != nullptr);
- if (!it->second->atlas)
+ if (!it->second->atlas) [[unlikely]]
it->second->atlas = get_wall_atlas(it->second->name, path);
return it->second->atlas;
}
diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp
index 6021aa3a..3c63028c 100644
--- a/src/chunk-walls.cpp
+++ b/src/chunk-walls.cpp
@@ -248,7 +248,7 @@ auto chunk::ensure_wall_mesh() noexcept -> wall_mesh_tuple
return {wall_mesh, {}, 0};
if (!_walls_modified)
- return { wall_mesh, _walls->mesh_indexes, size_t(wall_mesh.count()/6) };
+ return { wall_mesh, _walls->mesh_indexes, (size_t)wall_mesh.count()/6u };
_walls_modified = false;
wall_mesh = make_wall_mesh();