From: Torsten Dreyer Date: Thu, 12 Aug 2010 09:42:04 +0000 (+0200) Subject: two warning fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1f6555c9ad3fb75cb474fbf99b46333830285514;p=simgear.git two warning fixes --- diff --git a/simgear/scene/util/StateAttributeFactory.cxx b/simgear/scene/util/StateAttributeFactory.cxx index 76124da0..25a0a576 100644 --- a/simgear/scene/util/StateAttributeFactory.cxx +++ b/simgear/scene/util/StateAttributeFactory.cxx @@ -39,7 +39,7 @@ StateAttributeFactory::StateAttributeFactory() { _standardAlphaFunc = new AlphaFunc; _standardAlphaFunc->setFunction(osg::AlphaFunc::GREATER); - _standardAlphaFunc->setReferenceValue(0.01); + _standardAlphaFunc->setReferenceValue(0.01f); _standardAlphaFunc->setDataVariance(Object::STATIC); _smooth = new ShadeModel; _smooth->setMode(ShadeModel::SMOOTH); diff --git a/simgear/structure/SGSharedPtr.hxx b/simgear/structure/SGSharedPtr.hxx index f321b12d..98b72f22 100644 --- a/simgear/structure/SGSharedPtr.hxx +++ b/simgear/structure/SGSharedPtr.hxx @@ -88,7 +88,7 @@ public: { return T::count(_ptr); } bool valid(void) const - { return _ptr; } + { return _ptr != NULL; } void clear() { put(); }