From a8ba041b67d97349e7a78742246367c4432447dc Mon Sep 17 00:00:00 2001 From: frohlich Date: Wed, 30 May 2007 13:07:05 +0000 Subject: [PATCH] Modified Files: simgear/scene/model/SGMaterialAnimation.cxx: Olaf Flebbe: Use brakets around bitwise operations. Greetings from LinuxTag, Berlin ... :) --- simgear/scene/model/SGMaterialAnimation.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simgear/scene/model/SGMaterialAnimation.cxx b/simgear/scene/model/SGMaterialAnimation.cxx index 9f967a14..7e6a2acb 100644 --- a/simgear/scene/model/SGMaterialAnimation.cxx +++ b/simgear/scene/model/SGMaterialAnimation.cxx @@ -471,13 +471,13 @@ SGMaterialAnimation::createAnimationGroup(osg::Group& parent) mat->setColorMode(osg::Material::OFF); } else if ((suppliedColors & defaultColorModeMask) != 0) { // First deal with the complicated AMBIENT/DIFFUSE case. - if (defaultColorModeMask & AMBIENT_DIFFUSE != 0) { + if ((defaultColorModeMask & AMBIENT_DIFFUSE) != 0) { // glColor can supply colors not specified by the animation. unsigned matColorModeMask = ((~suppliedColors & defaultColorModeMask) & AMBIENT_DIFFUSE); - if (matColorModeMask & DIFFUSE != 0) + if ((matColorModeMask & DIFFUSE) != 0) mat->setColorMode(osg::Material::DIFFUSE); - else if (matColorModeMask & AMBIENT != 0) + else if ((matColorModeMask & AMBIENT) != 0) mat->setColorMode(osg::Material::AMBIENT); else mat->setColorMode(osg::Material::OFF); -- 2.39.5