logo separator

[mkgmap-dev] evaluation of boolean options

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Nov 26 10:17:46 GMT 2014

Hi programmers,

the evaluation of boolean options in mkgmap is a bit confusing.
It is possible to specify e.g. 
--drive-on-left 
or
--drive-on-left=true
or
--drive-on-left=false
or
--drive-on-left=any-value

In the current code both all have the same effect, because
the evaluation is done like this:
driveOnLeft = props.getProperty("drive-on-left") != null; 

On the other hand, 
--keep-going
and 
--keep-going=false 
do not have the same effect, and that is true for most
boolean options, because typically we use this kind of evaluation:
linkPOIsToWays = props.getProperty("link-pois-to-ways", false); 

I think we should always use the latter method. Do you agree?

Gerd

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141126/b4745166/attachment.html>


More information about the mkgmap-dev mailing list