summaryrefslogtreecommitdiff
path: root/src/newgrf_class_func.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:27:55 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:27:55 +0000
commit6f4d2160c25c75ed0d09657bfb0f85fdac65bfcd (patch)
tree0002c621456141b330133f45a959fe4c6b28ac7c /src/newgrf_class_func.h
parent73d926c8d4b7cb327cb1d3484dbecd8303268172 (diff)
downloadopenttd-6f4d2160c25c75ed0d09657bfb0f85fdac65bfcd.tar.xz
(svn r24162) -Codechange: Remove NewGRFClass::GetName() and SetName() in favour of using Get() and direct member access (which is needed anyway for GRF string resolving).
Diffstat (limited to 'src/newgrf_class_func.h')
-rw-r--r--src/newgrf_class_func.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/newgrf_class_func.h b/src/newgrf_class_func.h
index 15cacd4e2..0165b518c 100644
--- a/src/newgrf_class_func.h
+++ b/src/newgrf_class_func.h
@@ -65,18 +65,6 @@ DEFINE_NEWGRF_CLASS_METHOD(Tid)::Allocate(uint32 global_id)
}
/**
- * Set the name of a particular class.
- * @param cls_id The id for the class.
- * @pre index < GetCount(cls_id)
- * @param name The new name for the class.
- */
-DEFINE_NEWGRF_CLASS_METHOD(void)::SetName(Tid cls_id, StringID name)
-{
- assert(cls_id < Tmax);
- classes[cls_id].name = name;
-}
-
-/**
* Assign a spec to one of the classes.
* @param spec The spec to assign.
* @note The spec must have a valid class id set.
@@ -105,18 +93,6 @@ NewGRFClass<Tspec, Tid, Tmax> *NewGRFClass<Tspec, Tid, Tmax>::Get(Tid cls_id)
}
/**
- * Get the name of a particular class.
- * @param cls_id The class to get the name of.
- * @pre index < GetCount(cls_id)
- * @return The name of said class.
- */
-DEFINE_NEWGRF_CLASS_METHOD(StringID)::GetName(Tid cls_id)
-{
- assert(cls_id < Tmax);
- return classes[cls_id].name;
-}
-
-/**
* Get the number of allocated classes.
* @return The number of classes.
*/
@@ -186,10 +162,8 @@ DEFINE_NEWGRF_CLASS_METHOD(const Tspec *)::GetByGrf(uint32 grfid, byte local_id,
#define INSTANTIATE_NEWGRF_CLASS_METHODS(name, Tspec, Tid, Tmax) \
template void name::Reset(); \
template Tid name::Allocate(uint32 global_id); \
- template void name::SetName(Tid cls_id, StringID name); \
template void name::Assign(Tspec *spec); \
template NewGRFClass<Tspec, Tid, Tmax> *name::Get(Tid cls_id); \
- template StringID name::GetName(Tid cls_id); \
template uint name::GetCount(); \
template uint name::GetCount(Tid cls_id); \
template const Tspec *name::Get(Tid cls_id, uint index); \