From: ehofman Date: Tue, 4 Nov 2003 13:25:23 +0000 (+0000) Subject: Save on a number of CPU costly strcmp calls when using the blend function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c4d5d85c3eea3518bd208b2f8859c5ddd89ce58e;p=simgear.git Save on a number of CPU costly strcmp calls when using the blend function --- diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index 8988c339..8d471a4e 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -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();