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(); }