diff --git a/simgear/structure/SGSharedPtr.hxx b/simgear/structure/SGSharedPtr.hxx index 3de62e6c..479c1972 100644 --- a/simgear/structure/SGSharedPtr.hxx +++ b/simgear/structure/SGSharedPtr.hxx @@ -123,4 +123,13 @@ T* get_pointer(SGSharedPtr const & p) { return p.ptr(); } + +/** + * static_cast for SGSharedPtr + */ +template +SGSharedPtr static_pointer_cast(SGSharedPtr const & r) +{ + return SGSharedPtr( static_cast(r.get()) ); +} #endif