From c4d5d85c3eea3518bd208b2f8859c5ddd89ce58e Mon Sep 17 00:00:00 2001 From: ehofman Date: Tue, 4 Nov 2003 13:25:23 +0000 Subject: [PATCH] Save on a number of CPU costly strcmp calls when using the blend function --- simgear/scene/model/animation.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.39.5