News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[patch] r5442 compilation error

Started by swed, March 01, 2012, 04:45:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

swed

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 !

prissi

#1
Why on earth it wants to convert to koord? All those are of type KOORD_VAL ???

Thanks!