
Hi Ticker, in what situation do we still need the comparison with TERTIARY strength? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Mittwoch, 27. Oktober 2021 14:35 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4810: revert changes from r4809 for now, they caused more trouble Hi Gerd Yes, you're right. Two solutions: Because there is no intermingling in the use of the Sort object in the steps of getting it, generating the keys and doing the sort, each use that is going to use createSortKey must set the keyStrength beforehand. There are, I think, 6 other places where this should be done - and they probably will all use SECONDARY. Remove this usage and change Mdr5 to be more convention and use lastCity/collator.compare(city.xxx(), lastCity.xxx()). I had originally changed it to be like this, but it adds extra cost, whereas changing the key reduces cost. Ticker On Wed, 2021-10-27 at 11:57 +0000, Gerd Petermann wrote:
Hi Ticker,
if I got that right the method Sort.setKeyStrength() changes the Sort instance that is also used in other classes? This looks confusing if not dangerous.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Mittwoch, 27. Oktober 2021 13:41 An: mkgmap development Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4810: revert changes from r4809 for now, they caused more trouble
Hi Gerd
Attached is version 3 of the patch.
The significant problem was the logic (in Mdr5) where change in sortKey only was used to make unique lists, implying TERTIARY differences. The related structures had been processed with a Collator with SECONDARY strength. I've added an option to set the strength in the keys.
The other changes are in Mdr25.sortCities:
If the same city name with the same region name was in 2 countries, it didn't spot the new country - I realise this is very unlikely.
Be consistent with collator strength when spotting changes in country. Again, unlikely that the same country occurs with different letter- case.
Ticker
On Mon, 2021-10-25 at 08:27 +0100, svn commit wrote:
Version mkgmap-r4810 was committed by gerd on Mon, 25 Oct 2021
revert changes from r4809 for now, they caused more trouble
http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4810 _______________________________________________ mkgmap-svn mailing list To unsubscribe send an mail to mkgmap-svn-leave@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-svn
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev