Use ring buffers for tile/landscape candidate queues

This commit is contained in:
Jonathan G Rennison
2023-08-18 18:48:12 +01:00
parent 69683eecb8
commit 7502fbd44b
2 changed files with 4 additions and 4 deletions

View File

@@ -35,10 +35,10 @@
#include "town.h"
#include "3rdparty/cpp-btree/btree_set.h"
#include "scope_info.h"
#include "core/ring_buffer.hpp"
#include <array>
#include <list>
#include <set>
#include <deque>
#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<TileIndex> queue;
ring_buffer<TileIndex> queue;
queue.push_back(begin);
bool found = false;