From 0f0e7e43cf09c0ff82e4119b08956670160aaa58 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 22 Apr 2012 16:28:14 +0000 Subject: (svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount(). --- src/newgrf_class.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/newgrf_class.h') 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); }; -- cgit v1.2.3-54-g00ecf