logo separator

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

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Apr 25 06:33:27 BST 2018

Hi Ticker,

I've looked through the patch and I think that all places with %%% are indeed errors. I think I should fix those first. Will have a closer look today.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Dienstag, 24. April 2018 12:37:31
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers

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



More information about the mkgmap-dev mailing list