Save on a number of CPU costly strcmp calls when using the blend function

This commit is contained in:
ehofman 2003-11-04 13:25:23 +00:00
parent d915ccec6e
commit c4d5d85c3e

View File

@ -102,9 +102,9 @@ change_alpha( ssgBase *_branch, float _blend )
for (i = 0; i < ((ssgBranch *)_branch)->getNumKids(); i++)
change_alpha( ((ssgBranch *)_branch)->getKid(i), _blend );
if ( strcmp("ssgLeaf", _branch->getTypeName()) &&
strcmp("ssgVtxTable", _branch->getTypeName()) &&
strcmp("ssgVTable", _branch->getTypeName()) )
if ( !_branch->isAKindOf(ssgTypeLeaf())
&& !_branch->isAKindOf(ssgTypeVtxTable())
&& !_branch->isAKindOf(ssgTypeVTable()) )
return;
int num_colors = ((ssgLeaf *)_branch)->getNumColours();