[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2] localcharset: short-circuit the search for an alias on a
Re: [PATCH V2] localcharset: short-circuit the search for an alias on a Mac
Sat, 21 Apr 2018 12:41:57 +0200
KMail/5.1.3 (Linux/4.4.0-119-generic; KDE/5.18.0; x86_64; ; )
> * lib/localcharset.c (get_charset_aliases): Add a tautological
> UTF-8 entry to speed up the search for this case.
> Most machines default to a UTF-8 locale nowadays, so begin the
> list of aliases with a dummy UTF-8 entry so it will be found
> immediately and a time-consuming search through the rest of
> the list is avoided.
I added a comment.
Explanations about the code belong in the code, as comments, IMO.
Readers of the code should not be forced to constantly refer to
ChangeLog entries and commit messages in order to understand the code.