Browse Source

Don't throw away components that come last

Adam Johnson 12 years ago
parent
commit
3e592b76ff
  1. 10
      Sources/Tools/MaxComponent/plComponentMgr.cpp

10
Sources/Tools/MaxComponent/plComponentMgr.cpp

@ -102,13 +102,6 @@ int IDescCompare(ClassDesc *desc1, ClassDesc *desc2);
void plComponentMgr::Register(ClassDesc *desc) void plComponentMgr::Register(ClassDesc *desc)
{ {
// No descs? Go ahead and push it to the back...
if (fDescs.size() == 0)
{
fDescs.push_back(desc);
return;
}
// Organize desc's by category and name // Organize desc's by category and name
std::vector<ClassDesc*>::iterator it; std::vector<ClassDesc*>::iterator it;
for (it = fDescs.begin(); it != fDescs.end(); it++) for (it = fDescs.begin(); it != fDescs.end(); it++)
@ -119,6 +112,9 @@ void plComponentMgr::Register(ClassDesc *desc)
return; return;
} }
} }
// Still here? Push it to the back.
fDescs.push_back(desc);
} }
int IDescCompare(ClassDesc *desc1, ClassDesc *desc2) int IDescCompare(ClassDesc *desc1, ClassDesc *desc2)

Loading…
Cancel
Save