diff --git a/src/landscape.cpp b/src/landscape.cpp index 871067e8cf..dfc4d88387 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -35,10 +35,10 @@ #include "town.h" #include "3rdparty/cpp-btree/btree_set.h" #include "scope_info.h" +#include "core/ring_buffer.hpp" #include #include #include -#include #include "table/strings.h" #include "table/sprites.h" @@ -1359,7 +1359,7 @@ static bool FlowRiver(TileIndex spring, TileIndex begin, uint min_river_length) SET_MARK(begin); /* Breadth first search for the closest tile we can flow down to. */ - std::deque queue; + ring_buffer queue; queue.push_back(begin); bool found = false; diff --git a/src/map.cpp b/src/map.cpp index 1c2e35abe9..ce820b8d48 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -15,8 +15,8 @@ #include "rail_map.h" #include "tunnelbridge_map.h" #include "3rdparty/cpp-btree/btree_map.h" +#include "core/ring_buffer.hpp" #include -#include #include #if defined(__linux__) @@ -442,7 +442,7 @@ bool EnoughContiguousTilesMatchingCondition(TileIndex tile, uint threshold, Test static_assert(MAX_MAP_TILES_BITS <= 30); btree::btree_set processed_tiles; - std::deque candidates; + ring_buffer candidates; uint matching_count = 0; auto process_tile = [&](TileIndex t, DiagDirection exclude_onward_dir) {