logo separator

[mkgmap-dev] methods to write signed / unsigned integers

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Tue Apr 24 11:37:31 BST 2018

Hi Gerd & Steve

I've done another pass through Display to remove lots of casts and
masking. 

This required removed the overloading of
Displayer.setBytes(byte/char/short/int) by having setBytes1/2/4() to
match the existing setBytes3()

DisplayItem.getValue() now returns the same value as fed in with
setBytesX(), which also returns this value. 

I think Displayer.byteValue(), sByteValue, charValue should be changed
to return this same int value, this will allow more casts/masks to be
removed.

In this pass I've tried to keep the exact same final output as the
version before any of the IO changes. There are a few places that I've
marked with %%% where I think the code is wrong, treating something as
signed when it isn't.

I don't have any DEM data for testing test.display.DemDisplay but I've
done all the other sections.

NodConvert gives Exception in thread "main" java.lang.AssertionError
at test.display.NodConvert.pointerPart(NodConvert.java:274)
                 if (first) {
                        assert !newdir;
but it did this for me with the pre-io-change version

Regards
Ticker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: display_io_3.patch
Type: text/x-patch
Size: 38418 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20180424/e036082f/attachment-0001.bin>


More information about the mkgmap-dev mailing list