dhaumann added a subscriber: mwolff.
dhaumann added inline comments.

INLINE COMMENTS

> kossebau wrote in katemodemanager.cpp:214
> I saw you mentioned this elsewhere, but thought it was a typo. Never seen 
> this before, so curious to leatn what advantage using an initializer list 
> brings here. By the name, i would expect its prpose is usually one-time, to 
> init a bigger structure. But by the code it seems here the list is kept, and 
> simply always iterated over?
> Where is the motivation for this?

Because you can write auto and don't have to care. The initializee_list has 
bwgin(), end(), size(), all which the plain C array does not have:
https://en.cppreference.com/w/cpp/utility/initializer_list

But I could imagine the generated code even looks the same? Maybe @mwolff knows.

REPOSITORY
  R39 KTextEditor

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

To: kossebau, #kate, cullmann
Cc: mwolff, dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, LeGast00n, 
GB_2, domson, michaelh, ngraham, bruns, demsking, sars

Reply via email to