Changed the way enums work

This commit is contained in:
andreja6
2018-10-23 17:42:15 -07:00
parent 3c2ae53449
commit ccf3ade099
24 changed files with 49 additions and 127 deletions

View File

@@ -136,16 +136,14 @@ void Instance::removeChild(Instance* oldChild)
Instance* Instance::findFirstChild(std::string name)
{
Instance* child = NULL;
for(size_t i = 0; i < children.size(); i++)
{
if(children.at(i)->name == name)
if(children.at(i)->name.compare(name) == 0)
{
child = children.at(i);
break;
return children.at(i);
}
}
return child;
return NULL;
}