D16830: WIP: Tabbar: Add 'File Properties' menu item and three more (Rename, Delete and Compare)

gregormi noreply at phabricator.kde.org
Tue Nov 20 22:49:08 GMT 2018


gregormi added inline comments.

INLINE COMMENTS

> dhaumann wrote in katefileactions.cpp:51
> RAII: here we request a resource without initialization. Correct is:
> 
>   bool ok = false;
> 
> Even if the bool is set in the next line via out parameter. Over time the code may change and then we have an uninitialized variable. :)

Thanks for the review! I didn't look at the copied code very closely so far. My bad.

Though "bool ok;" should be corrected, I woudn't call it RAII: https://en.cppreference.com/w/cpp/language/raii says RAII is about acquiring and releasing resources which exist in limited supply like heap memory, file handles etc. Creating a mere stack variable does not fit this description.

REPOSITORY
  R40 Kate

REVISION DETAIL
  https://phabricator.kde.org/D16830

To: gregormi, #kate
Cc: dhaumann, mmustac, ngraham, kwrite-devel, michaelh, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20181120/a6448a0e/attachment.html>


More information about the KWrite-Devel mailing list