[patch] KLocale: minor optimization + use safer qgetenv

Chusslove Illich caslav.ilic at gmx.net
Thu Mar 6 12:14:13 GMT 2008


> [: Jaroslaw Staniek :]
> - Minor optimization: before we've typically iterated twice (in
> initLanguageList() and setLanguage() over lost of (typically) empty
> strings.
> [...]
> +static inline void getLanguagesFromVariable(QStringList& list, char* variable)

I don't think the optimization is worth it by itself, as in setLanguage the
empty strings are eliminated up front. But I do like that the variable
parsing (QFile::decodeName(...).split(':')) becomes centralized; I would
only call the function appendLanguagesFromVariable.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080306/70dd8ca1/attachment.sig>


More information about the kde-core-devel mailing list