The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: swed on March 01, 2012, 04:45:13 PM

Title: [patch] r5442 compilation error
Post by: swed on March 01, 2012, 04:45:13 PM
Hello!

I have a compilation problem with svn r5442, and g++ 4.3.3 :

===> CXX gui/convoi_filter_frame.cc
gui/convoi_filter_frame.cc: In constructor 'convoi_filter_frame_t::convoi_filter_frame_t(spieler_t*, convoi_frame_t*)':
gui/convoi_filter_frame.cc:143: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
gui/convoi_filter_frame.cc:143: note: candidate 1: operator*(int, int) <built-in>
gui/../dataobj/koord.h:105: note: candidate 2: koord operator*(const koord&, sint16)
gui/convoi_filter_frame.cc:144: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
gui/convoi_filter_frame.cc:144: note: candidate 1: operator*(int, int) <built-in>
gui/../dataobj/koord.h:105: note: candidate 2: koord operator*(const koord&, sint16)
make: *** [build/default/gui/convoi_filter_frame.o] Error 1


I fixed it by adding a cast (see attached patch).

Bye !
Title: Re: [patch] r5442 compilation error
Post by: prissi on March 01, 2012, 08:26:11 PM
Why on earth it wants to convert to koord? All those are of type KOORD_VAL ???

Thanks!