mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r22116) -Codechange: use PoolBase::Clean() at more places
This commit is contained in:
parent
642fb19d4f
commit
756cc6cf65
|
@ -134,8 +134,3 @@ CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, Group
|
||||||
|
|
||||||
return CMD_ERROR;
|
return CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeEngineRenews()
|
|
||||||
{
|
|
||||||
_enginerenew_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -17,14 +17,6 @@
|
||||||
CargoPacketPool _cargopacket_pool("CargoPacket");
|
CargoPacketPool _cargopacket_pool("CargoPacket");
|
||||||
INSTANTIATE_POOL_METHODS(CargoPacket)
|
INSTANTIATE_POOL_METHODS(CargoPacket)
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize, i.e. clean, the pool with cargo packets.
|
|
||||||
*/
|
|
||||||
void InitializeCargoPackets()
|
|
||||||
{
|
|
||||||
_cargopacket_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new packet for savegame loading.
|
* Create a new packet for savegame loading.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,7 +24,7 @@ typedef uint32 CargoPacketID;
|
||||||
struct CargoPacket;
|
struct CargoPacket;
|
||||||
|
|
||||||
/** Type of the pool for cargo packets for a little over 16 million packets. */
|
/** Type of the pool for cargo packets for a little over 16 million packets. */
|
||||||
typedef Pool<CargoPacket, CargoPacketID, 1024, 0xFFF000, true, false> CargoPacketPool;
|
typedef Pool<CargoPacket, CargoPacketID, 1024, 0xFFF000, PT_NORMAL, true, false> CargoPacketPool;
|
||||||
/** The actual pool with cargo packets. */
|
/** The actual pool with cargo packets. */
|
||||||
extern CargoPacketPool _cargopacket_pool;
|
extern CargoPacketPool _cargopacket_pool;
|
||||||
|
|
||||||
|
|
|
@ -601,7 +601,6 @@ static void MaybeStartNewCompany()
|
||||||
/** Initialize the pool of companies. */
|
/** Initialize the pool of companies. */
|
||||||
void InitializeCompanies()
|
void InitializeCompanies()
|
||||||
{
|
{
|
||||||
_company_pool.CleanPool();
|
|
||||||
_cur_company_tick_index = 0;
|
_cur_company_tick_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,15 @@ PoolBase::~PoolBase()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean all pools - calls Pool::CleanPool()
|
* Clean all pools of given type.
|
||||||
|
* @param pt pool types to clean.
|
||||||
*/
|
*/
|
||||||
/* static */ void PoolBase::CleanAll()
|
/* static */ void PoolBase::Clean(PoolType pt)
|
||||||
{
|
{
|
||||||
PoolVector *pools = PoolBase::GetPools();
|
PoolVector *pools = PoolBase::GetPools();
|
||||||
PoolBase **end = pools->End();
|
PoolBase **end = pools->End();
|
||||||
for (PoolBase **ppool = pools->Begin(); ppool != end; ppool++) {
|
for (PoolBase **ppool = pools->Begin(); ppool != end; ppool++) {
|
||||||
PoolBase *pool = *ppool;
|
PoolBase *pool = *ppool;
|
||||||
pool->CleanPool();
|
if (pool->type & pt) pool->CleanPool();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,15 @@
|
||||||
#include "pool_type.hpp"
|
#include "pool_type.hpp"
|
||||||
|
|
||||||
#define DEFINE_POOL_METHOD(type) \
|
#define DEFINE_POOL_METHOD(type) \
|
||||||
template <class Titem, typename Tindex, size_t Tgrowth_step, size_t Tmax_size, bool Tcache, bool Tzero> \
|
template <class Titem, typename Tindex, size_t Tgrowth_step, size_t Tmax_size, PoolType Tpool_type, bool Tcache, bool Tzero> \
|
||||||
type Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero>
|
type Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a clean pool.
|
* Create a clean pool.
|
||||||
* @param name The name for the pool.
|
* @param name The name for the pool.
|
||||||
*/
|
*/
|
||||||
DEFINE_POOL_METHOD(inline)::Pool(const char *name) :
|
DEFINE_POOL_METHOD(inline)::Pool(const char *name) :
|
||||||
|
PoolBase(Tpool_type),
|
||||||
name(name),
|
name(name),
|
||||||
size(0),
|
size(0),
|
||||||
first_free(0),
|
first_free(0),
|
||||||
|
|
|
@ -13,11 +13,25 @@
|
||||||
#define POOL_TYPE_HPP
|
#define POOL_TYPE_HPP
|
||||||
|
|
||||||
#include "smallvec_type.hpp"
|
#include "smallvec_type.hpp"
|
||||||
|
#include "enum_type.hpp"
|
||||||
|
|
||||||
|
/** Various types of a pool. */
|
||||||
|
enum PoolType {
|
||||||
|
PT_NONE = 0x00, ///< No pool is selected.
|
||||||
|
PT_NORMAL = 0x01, ///< Normal pool containing game objects.
|
||||||
|
PT_NCLIENT = 0x02, ///< Network client pools.
|
||||||
|
PT_NADMIN = 0x04, ///< Network admin pool.
|
||||||
|
PT_DATA = 0x08, ///< NewGRF or other data, that is not reset together with normal pools.
|
||||||
|
PT_ALL = 0x0F, ///< All pool types.
|
||||||
|
};
|
||||||
|
DECLARE_ENUM_AS_BIT_SET(PoolType)
|
||||||
|
|
||||||
typedef SmallVector<struct PoolBase *, 4> PoolVector; ///< Vector of pointers to PoolBase
|
typedef SmallVector<struct PoolBase *, 4> PoolVector; ///< Vector of pointers to PoolBase
|
||||||
|
|
||||||
/** Base class for base of all pools. */
|
/** Base class for base of all pools. */
|
||||||
struct PoolBase {
|
struct PoolBase {
|
||||||
|
const PoolType type; ///< Type of this pool.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function used to access the vector of all pools.
|
* Function used to access the vector of all pools.
|
||||||
* @return pointer to vector of all pools
|
* @return pointer to vector of all pools
|
||||||
|
@ -28,12 +42,13 @@ struct PoolBase {
|
||||||
return pools;
|
return pools;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CleanAll();
|
static void Clean(PoolType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contructor registers this object in the pool vector.
|
* Contructor registers this object in the pool vector.
|
||||||
|
* @param pt type of this pool.
|
||||||
*/
|
*/
|
||||||
PoolBase()
|
PoolBase(PoolType pt) : type(pt)
|
||||||
{
|
{
|
||||||
*PoolBase::GetPools()->Append() = this;
|
*PoolBase::GetPools()->Append() = this;
|
||||||
}
|
}
|
||||||
|
@ -52,11 +67,12 @@ struct PoolBase {
|
||||||
* @tparam Tindex Type of the index for this pool
|
* @tparam Tindex Type of the index for this pool
|
||||||
* @tparam Tgrowth_step Size of growths; if the pool is full increase the size by this amount
|
* @tparam Tgrowth_step Size of growths; if the pool is full increase the size by this amount
|
||||||
* @tparam Tmax_size Maximum size of the pool
|
* @tparam Tmax_size Maximum size of the pool
|
||||||
|
* @tparam Tpool_type Type of this pool
|
||||||
* @tparam Tcache Whether to perform 'alloc' caching, i.e. don't actually free/malloc just reuse the memory
|
* @tparam Tcache Whether to perform 'alloc' caching, i.e. don't actually free/malloc just reuse the memory
|
||||||
* @tparam Tzero Whether to zero the memory
|
* @tparam Tzero Whether to zero the memory
|
||||||
* @warning when Tcache is enabled *all* instances of this pool's item must be of the same size.
|
* @warning when Tcache is enabled *all* instances of this pool's item must be of the same size.
|
||||||
*/
|
*/
|
||||||
template <class Titem, typename Tindex, size_t Tgrowth_step, size_t Tmax_size, bool Tcache = false, bool Tzero = true>
|
template <class Titem, typename Tindex, size_t Tgrowth_step, size_t Tmax_size, PoolType Tpool_type = PT_NORMAL, bool Tcache = false, bool Tzero = true>
|
||||||
struct Pool : PoolBase {
|
struct Pool : PoolBase {
|
||||||
static const size_t MAX_SIZE = Tmax_size; ///< Make template parameter accessible from outside
|
static const size_t MAX_SIZE = Tmax_size; ///< Make template parameter accessible from outside
|
||||||
|
|
||||||
|
@ -116,7 +132,7 @@ struct Pool : PoolBase {
|
||||||
* Base class for all PoolItems
|
* Base class for all PoolItems
|
||||||
* @tparam Tpool The pool this item is going to be part of
|
* @tparam Tpool The pool this item is going to be part of
|
||||||
*/
|
*/
|
||||||
template <struct Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero> *Tpool>
|
template <struct Pool<Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero> *Tpool>
|
||||||
struct PoolItem {
|
struct PoolItem {
|
||||||
Tindex index; ///< Index of this pool item
|
Tindex index; ///< Index of this pool item
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,3 @@ Depot::~Depot()
|
||||||
}
|
}
|
||||||
DeleteWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_DEPOT_LIST, vt, GetTileOwner(this->xy), this->index).Pack());
|
DeleteWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_DEPOT_LIST, vt, GetTileOwner(this->xy), this->index).Pack());
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeDepots()
|
|
||||||
{
|
|
||||||
_depot_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include "slope_type.h"
|
#include "slope_type.h"
|
||||||
|
|
||||||
void ShowDepotWindow(TileIndex tile, VehicleType type);
|
void ShowDepotWindow(TileIndex tile, VehicleType type);
|
||||||
void InitializeDepots();
|
|
||||||
|
|
||||||
void DeleteDepotHighlightOfVehicle(const Vehicle *v);
|
void DeleteDepotHighlightOfVehicle(const Vehicle *v);
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,6 @@ static inline void DecreaseGroupNumVehicle(GroupID id_g)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InitializeGroup();
|
|
||||||
void SetTrainGroupID(Train *v, GroupID grp);
|
void SetTrainGroupID(Train *v, GroupID grp);
|
||||||
void UpdateTrainGroupID(Train *v);
|
void UpdateTrainGroupID(Train *v);
|
||||||
void RemoveVehicleFromGroup(const Vehicle *v);
|
void RemoveVehicleFromGroup(const Vehicle *v);
|
||||||
|
|
|
@ -67,11 +67,6 @@ Group::~Group()
|
||||||
free(this->num_engines);
|
free(this->num_engines);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeGroup()
|
|
||||||
{
|
|
||||||
_group_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new vehicle group.
|
* Create a new vehicle group.
|
||||||
|
|
|
@ -2638,8 +2638,6 @@ void IndustryMonthlyLoop()
|
||||||
|
|
||||||
void InitializeIndustries()
|
void InitializeIndustries()
|
||||||
{
|
{
|
||||||
_industry_pool.CleanPool();
|
|
||||||
|
|
||||||
Industry::ResetIndustryCounts();
|
Industry::ResetIndustryCounts();
|
||||||
_industry_sound_tile = 0;
|
_industry_sound_tile = 0;
|
||||||
|
|
||||||
|
|
24
src/misc.cpp
24
src/misc.cpp
|
@ -25,6 +25,7 @@
|
||||||
#include "tilehighlight_func.h"
|
#include "tilehighlight_func.h"
|
||||||
#include "network/network_func.h"
|
#include "network/network_func.h"
|
||||||
#include "window_func.h"
|
#include "window_func.h"
|
||||||
|
#include "core/pool_type.hpp"
|
||||||
|
|
||||||
|
|
||||||
extern TileIndex _cur_tileloop_tile;
|
extern TileIndex _cur_tileloop_tile;
|
||||||
|
@ -33,10 +34,6 @@ extern void MakeNewgameSettingsLive();
|
||||||
void InitializeSound();
|
void InitializeSound();
|
||||||
void InitializeMusic();
|
void InitializeMusic();
|
||||||
void InitializeVehicles();
|
void InitializeVehicles();
|
||||||
void InitializeDepots();
|
|
||||||
void InitializeEngineRenews();
|
|
||||||
void InitializeOrders();
|
|
||||||
void InitializeOrderBackups();
|
|
||||||
void InitializeClearLand();
|
void InitializeClearLand();
|
||||||
void InitializeRailGui();
|
void InitializeRailGui();
|
||||||
void InitializeRoadGui();
|
void InitializeRoadGui();
|
||||||
|
@ -45,13 +42,7 @@ void InitializeDockGui();
|
||||||
void InitializeObjectGui();
|
void InitializeObjectGui();
|
||||||
void InitializeIndustries();
|
void InitializeIndustries();
|
||||||
void InitializeObjects();
|
void InitializeObjects();
|
||||||
void InitializeTowns();
|
|
||||||
void InitializeSubsidies();
|
|
||||||
void InitializeTrees();
|
void InitializeTrees();
|
||||||
void InitializeSigns();
|
|
||||||
void InitializeStations();
|
|
||||||
void InitializeRoadStops();
|
|
||||||
void InitializeCargoPackets();
|
|
||||||
void InitializeCompanies();
|
void InitializeCompanies();
|
||||||
void InitializeCheats();
|
void InitializeCheats();
|
||||||
void InitializeNPF();
|
void InitializeNPF();
|
||||||
|
@ -77,15 +68,12 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
|
||||||
InitializeOldNames();
|
InitializeOldNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PoolBase::Clean(PT_NORMAL);
|
||||||
|
|
||||||
InitializeSound();
|
InitializeSound();
|
||||||
InitializeMusic();
|
InitializeMusic();
|
||||||
|
|
||||||
InitializeEngineRenews();
|
|
||||||
InitializeVehicles();
|
InitializeVehicles();
|
||||||
InitializeDepots();
|
|
||||||
InitializeOrders();
|
|
||||||
InitializeOrderBackups();
|
|
||||||
InitializeGroup();
|
|
||||||
|
|
||||||
InitNewsItemStructs();
|
InitNewsItemStructs();
|
||||||
InitializeLandscape();
|
InitializeLandscape();
|
||||||
|
@ -96,13 +84,7 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
|
||||||
InitializeDockGui();
|
InitializeDockGui();
|
||||||
InitializeObjectGui();
|
InitializeObjectGui();
|
||||||
InitializeAIGui();
|
InitializeAIGui();
|
||||||
InitializeTowns();
|
|
||||||
InitializeSubsidies();
|
|
||||||
InitializeTrees();
|
InitializeTrees();
|
||||||
InitializeSigns();
|
|
||||||
InitializeStations();
|
|
||||||
InitializeRoadStops();
|
|
||||||
InitializeCargoPackets();
|
|
||||||
InitializeIndustries();
|
InitializeIndustries();
|
||||||
InitializeObjects();
|
InitializeObjects();
|
||||||
InitializeBuildingCounts();
|
InitializeBuildingCounts();
|
||||||
|
|
|
@ -493,9 +493,7 @@ void ParseConnectionString(const char **company, const char **port, char *connec
|
||||||
*/
|
*/
|
||||||
static void InitializeNetworkPools(bool close_admins = true)
|
static void InitializeNetworkPools(bool close_admins = true)
|
||||||
{
|
{
|
||||||
_networkclientsocket_pool.CleanPool();
|
PoolBase::Clean(PT_NCLIENT | (close_admins ? PT_NADMIN : PT_NONE));
|
||||||
_networkclientinfo_pool.CleanPool();
|
|
||||||
if (close_admins) _networkadminsocket_pool.CleanPool();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
extern AdminIndex _redirect_console_to_admin;
|
extern AdminIndex _redirect_console_to_admin;
|
||||||
|
|
||||||
class ServerNetworkAdminSocketHandler;
|
class ServerNetworkAdminSocketHandler;
|
||||||
typedef Pool<ServerNetworkAdminSocketHandler, AdminIndex, 2, MAX_ADMINS> NetworkAdminSocketPool;
|
typedef Pool<ServerNetworkAdminSocketHandler, AdminIndex, 2, MAX_ADMINS, PT_NADMIN> NetworkAdminSocketPool;
|
||||||
extern NetworkAdminSocketPool _networkadminsocket_pool;
|
extern NetworkAdminSocketPool _networkadminsocket_pool;
|
||||||
|
|
||||||
/** Class for handling the server side of the game connection. */
|
/** Class for handling the server side of the game connection. */
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "../core/pool_type.hpp"
|
#include "../core/pool_type.hpp"
|
||||||
#include "../company_type.h"
|
#include "../company_type.h"
|
||||||
|
|
||||||
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientInfoPool;
|
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientInfoPool;
|
||||||
extern NetworkClientInfoPool _networkclientinfo_pool;
|
extern NetworkClientInfoPool _networkclientinfo_pool;
|
||||||
|
|
||||||
struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_pool> {
|
struct NetworkClientInfo : NetworkClientInfoPool::PoolItem<&_networkclientinfo_pool> {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
class ServerNetworkGameSocketHandler;
|
class ServerNetworkGameSocketHandler;
|
||||||
typedef ServerNetworkGameSocketHandler NetworkClientSocket;
|
typedef ServerNetworkGameSocketHandler NetworkClientSocket;
|
||||||
typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientSocketPool;
|
typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientSocketPool;
|
||||||
extern NetworkClientSocketPool _networkclientsocket_pool;
|
extern NetworkClientSocketPool _networkclientsocket_pool;
|
||||||
|
|
||||||
/** Class for handling the server side of the game connection. */
|
/** Class for handling the server side of the game connection. */
|
||||||
|
|
|
@ -52,7 +52,7 @@ typedef uint32 SpriteGroupID;
|
||||||
/* SPRITE_WIDTH is 24. ECS has roughly 30 sprite groups per real sprite.
|
/* SPRITE_WIDTH is 24. ECS has roughly 30 sprite groups per real sprite.
|
||||||
* Adding an 'extra' margin would be assuming 64 sprite groups per real
|
* Adding an 'extra' margin would be assuming 64 sprite groups per real
|
||||||
* sprite. 64 = 2^6, so 2^30 should be enough (for now) */
|
* sprite. 64 = 2^6, so 2^30 should be enough (for now) */
|
||||||
typedef Pool<SpriteGroup, SpriteGroupID, 1024, 1 << 30> SpriteGroupPool;
|
typedef Pool<SpriteGroup, SpriteGroupID, 1024, 1 << 30, PT_DATA> SpriteGroupPool;
|
||||||
extern SpriteGroupPool _spritegroup_pool;
|
extern SpriteGroupPool _spritegroup_pool;
|
||||||
|
|
||||||
/* Common wrapper for all the different sprite group types */
|
/* Common wrapper for all the different sprite group types */
|
||||||
|
|
|
@ -55,7 +55,6 @@ uint16 Object::counts[NUM_OBJECTS];
|
||||||
/** Initialize/reset the objects. */
|
/** Initialize/reset the objects. */
|
||||||
void InitializeObjects()
|
void InitializeObjects()
|
||||||
{
|
{
|
||||||
_object_pool.CleanPool();
|
|
||||||
Object::ResetTypeCounts();
|
Object::ResetTypeCounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ static void ShutdownGame()
|
||||||
free(_config_file);
|
free(_config_file);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PoolBase::CleanAll();
|
PoolBase::Clean(PT_ALL);
|
||||||
|
|
||||||
ResetNewGRFData();
|
ResetNewGRFData();
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,3 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeOrderBackups()
|
|
||||||
{
|
|
||||||
_order_backup_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -2009,9 +2009,3 @@ bool Order::ShouldStopAtStation(const Vehicle *v, StationID station) const
|
||||||
/* Finally do stop when there is no non-stop flag set for this type of station. */
|
/* Finally do stop when there is no non-stop flag set for this type of station. */
|
||||||
!(this->GetNonStopType() & (is_dest_station ? ONSF_NO_STOP_AT_DESTINATION_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS));
|
!(this->GetNonStopType() & (is_dest_station ? ONSF_NO_STOP_AT_DESTINATION_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeOrders()
|
|
||||||
{
|
|
||||||
_order_pool.CleanPool();
|
|
||||||
_orderlist_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -387,9 +387,3 @@ void RoadStop::Entry::CheckIntegrity(const RoadStop *rs) const
|
||||||
temp.Rebuild(rs, rs->east == this);
|
temp.Rebuild(rs, rs->east == this);
|
||||||
if (temp.length != this->length || temp.occupied != this->occupied) NOT_REACHED();
|
if (temp.length != this->length || temp.occupied != this->occupied) NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InitializeRoadStops()
|
|
||||||
{
|
|
||||||
_roadstop_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -59,13 +59,3 @@ void UpdateAllSignVirtCoords()
|
||||||
si->UpdateVirtCoord();
|
si->UpdateVirtCoord();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Initialize the signs
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void InitializeSigns()
|
|
||||||
{
|
|
||||||
_sign_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -514,9 +514,3 @@ StationRect& StationRect::operator = (const Rect &src)
|
||||||
this->bottom = src.bottom;
|
this->bottom = src.bottom;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InitializeStations()
|
|
||||||
{
|
|
||||||
_station_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
|
@ -62,14 +62,6 @@ void Subsidy::AwardTo(CompanyID company)
|
||||||
InvalidateWindowData(WC_SUBSIDIES_LIST, 0);
|
InvalidateWindowData(WC_SUBSIDIES_LIST, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes subsidies, files don't have to include subsidy_base,h this way
|
|
||||||
*/
|
|
||||||
void InitializeSubsidies()
|
|
||||||
{
|
|
||||||
_subsidy_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
||||||
Pair SetupSubsidyDecodeParam(const Subsidy *s, bool mode)
|
Pair SetupSubsidyDecodeParam(const Subsidy *s, bool mode)
|
||||||
{
|
{
|
||||||
NewsReferenceType reftype1 = NR_NONE;
|
NewsReferenceType reftype1 = NR_NONE;
|
||||||
|
|
|
@ -3028,11 +3028,6 @@ void TownsYearlyLoop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeTowns()
|
|
||||||
{
|
|
||||||
_town_pool.CleanPool();
|
|
||||||
}
|
|
||||||
|
|
||||||
static CommandCost TerraformTile_Town(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
|
static CommandCost TerraformTile_Town(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
|
||||||
{
|
{
|
||||||
if (AutoslopeEnabled()) {
|
if (AutoslopeEnabled()) {
|
||||||
|
|
|
@ -586,9 +586,6 @@ static AutoreplaceMap _vehicles_to_autoreplace;
|
||||||
|
|
||||||
void InitializeVehicles()
|
void InitializeVehicles()
|
||||||
{
|
{
|
||||||
_vehicle_pool.CleanPool();
|
|
||||||
_cargo_payment_pool.CleanPool();
|
|
||||||
|
|
||||||
_age_cargo_skip_counter = 1;
|
_age_cargo_skip_counter = 1;
|
||||||
|
|
||||||
_vehicles_to_autoreplace.Reset();
|
_vehicles_to_autoreplace.Reset();
|
||||||
|
|
Loading…
Reference in New Issue