Hi all,

I am proudly did finish a build tonight.

However I did2 additional Code changes. I do not trust my choice. :P

Both changes targetet to make the compiler happy, and to make a best shot correctness.

But I do not understand what I changed, I probably did it wrong. :-D


1) packagepixeliterator.hxx line 611

Error:

const int remainder( x(d.x) % num_intraword_positions );

Explanaition: x is an int while d.x is also int because d is a vigra:Diff2D. The compiler wants to caculate something but interprets x as a functioncall thus fails.

Fix:

I gave the compiler a valid formula. I thought maybe t is a dif and we want to move. I decided at random for negative move. Probable positive (+) would be more wise. Now that I think of it.

But I realy dont know f it is the right way.

const int remainder( (x-d.x) % num_intraword_positions );


2)svptext.cxx in SvpGlyphPeer::RemovingGlyph

Error:

if( rGlyphData.ExtDataRef().mpData != Format::NONE ) -> c++ compile error: ISO C++ forbids comparison between pointer and integer <https://stackoverflow.com/questions/2263681/c-compile-error-iso-c-forbids-comparison-between-pointer-and-integer> Explanation: Format::NONE = 0, so I did not get the -fpermissive flag to work. So I looked at the code. An alternative that probable makes sense is to check at this point if something is at all in rGlyphData.ExtDataRef().mpData. So instead of checking against Format::None I check now against NULL, Which the compiler accepted.

I will now try to find out what damage my guesses did. If you have any Idea how to check or any insight on where I changed code I am gratefull.


One last comment the code in both cases, I miss to see the beauty. I mean packagepiceliterator has the antipattern of Copy And Paste, while SvpGlyphPeer::RemovingGlyph tries to delete content from another class. And that class looks generic, due to the void object I think rGlyphData itself does not know what it is storing.

I do not like both codeparts.

All the best
Peter

Reply via email to