D6404: Use static_cast when sure about the result

Kevin Funk 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.

  R33 KDevPlatform


To: kossebau, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170705/2aeb6100/attachment-0001.html>

More information about the KDevelop-devel mailing list