]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/SGSharedPtr.hxx
Fix rpmlint/Linux packager complaints
[simgear.git] / simgear / structure / SGSharedPtr.hxx
index a494937bbaa11aef1b5dc3d41adcb43723da7db3..c815a2fa566f94253282109ec6d5a76ce4489dad 100644 (file)
@@ -88,7 +88,7 @@ public:
   { return T::count(_ptr); }
 
   bool valid(void) const
-  { return _ptr; }
+  { return _ptr != (T*)0; }
 
   void clear()
   { put(); }
@@ -113,4 +113,12 @@ private:
   friend class SGWeakPtr;
 };
 
+/**
+ * Support for boost::mem_fn
+ */
+template<typename T>
+T* get_pointer(SGSharedPtr<T> const & p)
+{
+  return p.ptr();
+}
 #endif