Instead of list use deque in FlowRiver, vector in StationViewWindow.
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
#include "company_func.h"
|
#include "company_func.h"
|
||||||
#include "pathfinder/npf/aystar.h"
|
#include "pathfinder/npf/aystar.h"
|
||||||
#include "saveload/saveload.h"
|
#include "saveload/saveload.h"
|
||||||
#include <list>
|
#include <deque>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
@@ -1118,7 +1118,7 @@ static bool FlowRiver(TileIndex spring, TileIndex begin)
|
|||||||
SET_MARK(begin);
|
SET_MARK(begin);
|
||||||
|
|
||||||
/* Breadth first search for the closest tile we can flow down to. */
|
/* Breadth first search for the closest tile we can flow down to. */
|
||||||
std::list<TileIndex> queue;
|
std::deque<TileIndex> queue;
|
||||||
queue.push_back(begin);
|
queue.push_back(begin);
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@@ -1626,7 +1626,7 @@ struct StationViewWindow : public Window {
|
|||||||
*/
|
*/
|
||||||
void SetDisplayedRow(const CargoDataEntry *data)
|
void SetDisplayedRow(const CargoDataEntry *data)
|
||||||
{
|
{
|
||||||
std::list<StationID> stations;
|
std::vector<StationID> stations;
|
||||||
const CargoDataEntry *parent = data->GetParent();
|
const CargoDataEntry *parent = data->GetParent();
|
||||||
if (parent->GetParent() == NULL) {
|
if (parent->GetParent() == NULL) {
|
||||||
this->displayed_rows.push_back(RowDisplay(&this->expanded_rows, data->GetCargo()));
|
this->displayed_rows.push_back(RowDisplay(&this->expanded_rows, data->GetCargo()));
|
||||||
|
Reference in New Issue
Block a user