summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-12-10 09:19:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-12-10 09:19:32 +0100
commit60c80cdca2108d05a0cd0cac8fcfc3658c4e3915 (patch)
treeeb415d0cf95b79919bae5e919d1f19626786524b /src/chunk.cpp
parent3464b29a50c1718a298b7e48c5e9c0dd509f1bb1 (diff)
w
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r--src/chunk.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index ca930777..2222b40a 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -23,10 +23,12 @@ bool is_log_quiet()
bool chunk::empty(bool force) const noexcept
{
- if (!force && !_maybe_empty)
+ if (!force && !_maybe_empty) [[likely]]
return false;
for (auto i = 0uz; i < TILE_COUNT; i++)
- if (!_objects.empty() || _ground && _ground->_ground_atlases[i] || _walls && _walls->empty())
+ if (!_objects.empty() ||
+ _ground && _ground->_ground_atlases[i] ||
+ _walls && _walls->atlases[i])
return _maybe_empty = false;
if (!_objects.empty())
return false;