You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All wrappers (property, method, constructor, destructor & enumeration) currently hold a pointer to the wrapper base class.
When the client holds a valid item, the pointer is set, otherwise its a nullptr.
Every invoke of a member method for the wrappers mentioned above, checks for nullptr.
That's an unnecessary check, just provide for the invalid case a derived class,
which handles this case. All if checks could be removed.
All wrappers (
property
,method
,constructor
,destructor
&enumeration
) currently hold a pointer to the wrapper base class.When the client holds a valid item, the pointer is set, otherwise its a
nullptr
.Every invoke of a member method for the wrappers mentioned above, checks for nullptr.
That's an unnecessary check, just provide for the invalid case a derived class,
which handles this case. All if checks could be removed.
To get the idea:
Current implementation:
New implementation:
m_wrapper
would point to the a derived class which implement the invalid case.The text was updated successfully, but these errors were encountered: