X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2FSGSharedPtr.hxx;h=c815a2fa566f94253282109ec6d5a76ce4489dad;hb=0908f867145683be76d2c26274451a44a7b1d5b0;hp=a494937bbaa11aef1b5dc3d41adcb43723da7db3;hpb=7e2dafdcb8ee701edfe18bcada0e4f0a27c895a0;p=simgear.git diff --git a/simgear/structure/SGSharedPtr.hxx b/simgear/structure/SGSharedPtr.hxx index a494937b..c815a2fa 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 != (T*)0; } void clear() { put(); } @@ -113,4 +113,12 @@ private: friend class SGWeakPtr; }; +/** + * Support for boost::mem_fn + */ +template +T* get_pointer(SGSharedPtr const & p) +{ + return p.ptr(); +} #endif