paddlestroke:
> Here we actually need to keep App::Origin. Because we do not allow deletion ONLY of origin objects. Not of normal LCS.
While the original code:
```cpp
auto origin = dynamic_cast<App::Origin*>(lcs);
if (origin && !origin->getInList().empty()) {
```
...handles this perfectly fine, intent isn't obvious when reading it.
Using `is<T>()` shows intent better and should avoid similar situations in the future.
7.6 KiB
7.6 KiB