D23645: Do not generate string list at runtime

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sun Sep 1 23:20:53 BST 2019


kossebau added inline comments.

INLINE COMMENTS

> dhaumann wrote in katemodemanager.cpp:214
> I would even prefer:
> 
>   static const auto commonSuffixes = { ... };
> 
> This way it's an initializer_list and a pattern we use at other places in KTextEditor as well. But of course, your patch is correct as well! Runtime should be the same.

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?

REPOSITORY
  R39 KTextEditor

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

To: kossebau, #kate, cullmann
Cc: dhaumann, cullmann, kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190901/3561b931/attachment.html>


More information about the KWrite-Devel mailing list