]> git.mxchange.org Git - simgear.git/commitdiff
Save on a number of CPU costly strcmp calls when using the blend function
authorehofman <ehofman>
Tue, 4 Nov 2003 13:25:23 +0000 (13:25 +0000)
committerehofman <ehofman>
Tue, 4 Nov 2003 13:25:23 +0000 (13:25 +0000)
simgear/scene/model/animation.cxx

index 8988c3399767214327accdc88dc3e3f681ea1566..8d471a4ea08792e1b6697394831025bc635d43d9 100644 (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();