aboutsummaryrefslogtreecommitdiff
path: root/src/objects.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects.cc')
-rw-r--r--src/objects.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/objects.cc b/src/objects.cc
index e6903cd..f617fb9 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -321,21 +321,13 @@ const char *ObjectType::getName(int Count){
return NULL;
}
- // TODO(fusion): This is yet another rabbit hole. I'm not sure why we have
- // the object name copied to the stack when `Plural` returns its own static
- // buffer.
-#if 0
- char ObjectName[50];
TObjectType *TypeP = ObjectTypes.at(this->TypeID);
- if(Type->Name != NULL){
- strcpy(ObjectName, TypeP->Name);
- }else{
- ObjectName[0] = 0;
+ const char *Name = TypeP->Name;
+ if(Name == NULL){
+ Name = "";
}
- return Plural(ObjectName, Count);
-#endif
- return "Unnamed";
+ return Plural(Name, Count);
}
const char *ObjectType::getDescription(void){