Commit 4665dd08 authored by daniel_e's avatar daniel_e
Browse files

Revert last change because it could fail if MI is used -- and that's

definitely more important than insane operator&() overloading :)
parent 41e24ad0
......@@ -208,8 +208,7 @@ SharedPtr<T> shared_dynamic_cast(const SharedPtr<U>& other)
template <class T, class U> inline
SharedPtr<T> shared_polymorphic_cast(const SharedPtr<U>& other)
{
dynamic_cast<T&>(*other); // may throw std::bad_cast
return SharedPtr<T>(static_cast<T*>(other.get()));
return SharedPtr<T>(&dynamic_cast<T&>(*other)); // may throw std::bad_cast
}
} // namespace Util
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment