Changeset - r20846:9aff10202f3d
[Not reviewed]
master
0 2 0
fonsinchen - 11 years ago 2013-10-20 13:47:11
fonsinchen@openttd.org
(svn r25890) -Codechange: define a smallstack for station IDs
2 files changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station.cpp
Show inline comments
 
@@ -33,6 +33,10 @@
 
StationPool _station_pool("Station");
 
INSTANTIATE_POOL_METHODS(Station)
 

	
 
typedef StationIDStack::SmallStackPool StationIDStackPool;
 
template<> StationIDStackPool StationIDStack::_pool("StationIDStack");
 
INSTANTIATE_POOL_METHODS(StationIDStack)
 

	
 
BaseStation::~BaseStation()
 
{
 
	free(this->name);
src/station_type.h
Show inline comments
 
@@ -13,6 +13,7 @@
 
#define STATION_TYPE_H
 

	
 
#include "core/smallvec_type.hpp"
 
#include "core/smallstack_type.hpp"
 
#include "tilearea_type.h"
 
#include <list>
 

	
 
@@ -28,6 +29,8 @@ struct Waypoint;
 
static const StationID NEW_STATION = 0xFFFE;
 
static const StationID INVALID_STATION = 0xFFFF;
 

	
 
typedef SmallStack<StationID, StationID, INVALID_STATION, 8, 0xFFFD> StationIDStack;
 

	
 
/** Station types */
 
enum StationType {
 
	STATION_RAIL,
0 comments (0 inline, 0 general)