diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 21:05:46 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-26 21:07:46 +0200 |
| commit | 978a605ada755b0a02f8e8ea768c3af7e40b4cd7 (patch) | |
| tree | 6a06534f848a1bd62b10a1c23d5e34bce99da953 /src/world.cpp | |
| parent | 15874e375334a2e5e4cd44f438ca180d22deb02a (diff) | |
allow forced collecting empty tiles
Diffstat (limited to 'src/world.cpp')
| -rw-r--r-- | src/world.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/world.cpp b/src/world.cpp index dcb1b4a3..07a83afe 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -51,12 +51,12 @@ void world::maybe_collect() collect(); } -void world::collect() +void world::collect(bool force) { for (auto it = _chunks.begin(); it != _chunks.end(); (void)0) { const auto& [_, c] = *it; - if (c.empty()) + if (c.empty(force)) it = _chunks.erase(it); else ++it; |
