D14127: Cache country <-> ISO code mapping in both directions
Daniel Vrátil
noreply at phabricator.kde.org
Sun Jul 15 12:55:15 BST 2018
dvratil added inline comments.
INLINE COMMENTS
> address.cpp:655
> // we search a map file for translations from country names to
> // iso codes, storing caching things in a QMap for faster future
> // access.
s/QMap/QHash/
> address.cpp:672
> + const auto iso = countryInfo[1].toString();
> + sIsoCache->countryToIso.insert(cname, iso);
> + return iso;
Would it make sense to also insert the strings to the `isoToCountry` hash table to benefit QString's explicit sharing (and vice-verase in `ISOToCountry()`), or is it unlikely any code would benefit from this?
REPOSITORY
R174 PIM: KContacts
REVISION DETAIL
https://phabricator.kde.org/D14127
To: vkrause
Cc: dvratil, kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180715/2c9aceae/attachment.html>
More information about the kde-pim
mailing list