D6404: Use static_cast when sure about the result
noreply at phabricator.kde.org
Wed Jul 5 17:48:49 UTC 2017
kfunk added inline comments.
> kossebau wrote in kdevdocumentview.cpp:257
> Rather no, `fileItem` is allowed to be nullptr. If something could be tested, `dynamic_cast<KDevDocumentItem*>` would be it, though there is no real danger some none-KDevDocumentItem is coming from the model,
> But actually that whole code rather should be redone, as `fileitem()` does some kind of dynamic casting as well, as only `KDevFileItem` implements it. Possibly code from before RTII was a okay thing. Left for someone else/some other idle time.
Ah, sorry, I missed the `->fileItem()`. Makes sense then.
To: kossebau, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel