summaryrefslogtreecommitdiff
path: root/src/newgrf_class.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:28:14 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:28:14 +0000
commit0f0e7e43cf09c0ff82e4119b08956670160aaa58 (patch)
tree73eac59bde99d2517e2766ada36995fe7952d2d3 /src/newgrf_class.h
parentcb434944885d5e5caa857deb3273712c4c223031 (diff)
downloadopenttd-0f0e7e43cf09c0ff82e4119b08956670160aaa58.tar.xz
(svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount().
Diffstat (limited to 'src/newgrf_class.h')
-rw-r--r--src/newgrf_class.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/newgrf_class.h b/src/newgrf_class.h
index df7734819..94360f459 100644
--- a/src/newgrf_class.h
+++ b/src/newgrf_class.h
@@ -41,14 +41,17 @@ public:
void Insert(Tspec *spec);
+ /** Get the number of allocated specs within the class. */
+ uint GetSpecCount() const { return this->count; }
+
+ const Tspec *GetSpec(uint index) const;
+
static void Reset();
static Tid Allocate(uint32 global_id);
static void Assign(Tspec *spec);
static NewGRFClass *Get(Tid cls_id);
static uint GetCount();
- static uint GetCount(Tid cls_id);
- static const Tspec *Get(Tid cls_id, uint index);
static const Tspec *GetByGrf(uint32 grfid, byte local_id, int *index);
};