- Subtypes "getValuesById" now returns a reference

- Minor cleanup of Transformer per one of my comments a few days ago.
This commit is contained in:
wagic.the.homebrew
2011-05-16 23:19:08 +00:00
parent 39420a911f
commit 480875d57a
3 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ public:
bool isType(unsigned int type); bool isType(unsigned int type);
bool isSubType(unsigned int type); bool isSubType(unsigned int type);
int add(string value, unsigned int parentType); int add(string value, unsigned int parentType);
const vector<string> getValuesById(); const vector<string>& getValuesById();
}; };
#endif #endif
-3
View File
@@ -2684,11 +2684,8 @@ int ATransformer::destroy()
} }
//in the case that we removed or added types to a card, so that it retains its original name when the effect is removed. //in the case that we removed or added types to a card, so that it retains its original name when the effect is removed.
if(_target->model->data->name.size())//tokens don't have a model name. if(_target->model->data->name.size())//tokens don't have a model name.
{
_target->name.clear();
_target->setName(_target->model->data->name.c_str()); _target->setName(_target->model->data->name.c_str());
} }
}
return 1; return 1;
} }
+1 -1
View File
@@ -95,7 +95,7 @@ bool Subtypes::isSubType(unsigned int type)
return (!isSuperType(type) && !isType(type)); return (!isSuperType(type) && !isType(type));
} }
const vector<string> Subtypes::getValuesById() const vector<string>& Subtypes::getValuesById()
{ {
return valuesById; return valuesById;
} }