Codechange: Removed SmallVector completely

This commit is contained in:
Henry Wilson
2019-03-03 17:30:09 +00:00
committed by PeterN
parent 6570f7989f
commit c01a2e2a81
69 changed files with 109 additions and 127 deletions

View File

@@ -2195,7 +2195,7 @@ bool AfterLoadGame()
/* Animated tiles would sometimes not be actually animated or
* in case of old savegames duplicate. */
extern SmallVector<TileIndex, 256> _animated_tiles;
extern std::vector<TileIndex> _animated_tiles;
for (auto tile = _animated_tiles.begin(); tile < _animated_tiles.end(); /* Nothing */) {
/* Remove if tile is not animated */
@@ -2939,7 +2939,7 @@ bool AfterLoadGame()
* So, make articulated parts catch up. */
RoadVehicle *v;
bool roadside = _settings_game.vehicle.road_side == 1;
SmallVector<uint, 16> skip_frames;
std::vector<uint> skip_frames;
FOR_ALL_ROADVEHICLES(v) {
if (!v->IsFrontEngine()) continue;
skip_frames.clear();

View File

@@ -18,7 +18,7 @@
#include "../safeguards.h"
extern SmallVector<TileIndex, 256> _animated_tiles;
extern std::vector<TileIndex> _animated_tiles;
/**
* Save the ANIT chunk.

View File

@@ -17,7 +17,7 @@
#include "../safeguards.h"
static SmallVector<RailTypeLabel, RAILTYPE_END> _railtype_list;
static std::vector<RailTypeLabel> _railtype_list;
/**
* Test if any saved rail type labels are different to the currently loaded
@@ -42,7 +42,7 @@ static bool NeedRailTypeConversion()
void AfterLoadLabelMaps()
{
if (NeedRailTypeConversion()) {
SmallVector<RailType, RAILTYPE_END> railtype_conversion_map;
std::vector<RailType> railtype_conversion_map;
for (uint i = 0; i < _railtype_list.size(); i++) {
RailType r = GetRailTypeByLabel(_railtype_list[i]);

View File

@@ -51,7 +51,7 @@ const SaveLoad *GetLinkGraphDesc()
*/
const SaveLoad *GetLinkGraphJobDesc()
{
static SmallVector<SaveLoad, 16> saveloads;
static std::vector<SaveLoad> saveloads;
static const char *prefix = "linkgraph.";
/* Build the SaveLoad array on first call and don't touch it later on */

View File

@@ -491,7 +491,7 @@ static inline uint RemapOrderIndex(uint x)
return _savegame_type == SGT_TTO ? (x - 0x1AC4) / 2 : (x - 0x1C18) / 2;
}
extern SmallVector<TileIndex, 256> _animated_tiles;
extern std::vector<TileIndex> _animated_tiles;
extern char *_old_name_array;
static uint32 _old_town_index;

View File

@@ -42,7 +42,7 @@ struct OldWaypoint {
};
/** Temporary array with old waypoints. */
static SmallVector<OldWaypoint, 16> _old_waypoints;
static std::vector<OldWaypoint> _old_waypoints;
/**
* Update the waypoint orders to get the new waypoint ID.