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
There are many places in the code where a child class is known to exist, but we have only the parent pointer. Currently this is handled as follows:
Parent* parentPtr = ...;
Child* ChildPtr = dynamic_cast<Child*>(parentPtr);
if (ChildPtr == nullptr) {
throwError(...);
}
\* use childPtr *\
This pattern is used many times, it might help simplify the code and make it easier to read if there were a simple helper to do all this. One possibility:
There are many places in the code where a child class is known to exist, but we have only the parent pointer. Currently this is handled as follows:
This pattern is used many times, it might help simplify the code and make it easier to read if there were a simple helper to do all this. One possibility:
The text was updated successfully, but these errors were encountered: