File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -85,19 +85,19 @@ namespace vsg
8585 virtual const std::type_info& type_info () const noexcept { return typeid (Object); }
8686 virtual bool is_compatible (const std::type_info& type) const noexcept { return typeid (Object) == type; }
8787
88- #if VSG_USE_dynamic_cast
89- template <class T >
90- T* cast () { return dynamic_cast <T*>(this ); }
91-
92- template <class T >
93- const T* cast () const { return dynamic_cast <const T*>(this ); }
94- #else
95- template <class T >
96- T* cast () { return is_compatible (typeid (T)) ? static_cast <T*>(this ) : nullptr ; }
97-
98- template <class T >
99- const T* cast () const { return is_compatible (typeid (T)) ? static_cast <const T*>(this ) : nullptr ; }
100- #endif
88+ #if VSG_USE_dynamic_cast
89+ template <class T >
90+ T* cast () { return dynamic_cast <T*>(this ); }
91+
92+ template <class T >
93+ const T* cast () const { return dynamic_cast <const T*>(this ); }
94+ #else
95+ template <class T >
96+ T* cast () { return is_compatible (typeid (T)) ? static_cast <T*>(this ) : nullptr ; }
97+
98+ template <class T >
99+ const T* cast () const { return is_compatible (typeid (T)) ? static_cast <const T*>(this ) : nullptr ; }
100+ #endif
101101
102102 // / clone this object using CopyOp's duplicates map to decide whether to clone or to return the original object.
103103 // / The default clone(CopyOp&) implementation simply returns ref_ptr<> to this object rather attempt to clone.
You can’t perform that action at this time.
0 commit comments