DescriptionRedefine LY_ASSERT_SMOB to deal with inherited is_smob
When LY_ASSERT_SMOB is called with a class that is actually derived from
some smobified base class providing is_smob and unsmob, the resulting
check and error message is inaccurate. This patch uses dynamic_cast in
order to sustain sensible behavior. The performance impact for
previously working code and type combinations is low since dynamic_cast
in this configuration resolves at compile time.
Patch Set 1 #Patch Set 2 : Be more conservative by defining a separate LY_ASSERT_DERIVED_SMOB #
MessagesTotal messages: 3
|