[csw-maintainers] Error: Ambiguous "?:" expression

Jake Goerzen jgoerzen at opencsw.org
Tue Mar 9 00:40:31 CET 2010


Hello,

  Would some one with C++ knowledge help me out?  I've run into an
error compiling wesnoth version 1.6.5 using Sun Studio 11.  The
relevant compiler error message:

"marked-up_text.cpp", line 222: Error: Ambiguous "?:" expression,
second operand of type "surface" and third operand of type "int" can
be converted to one another.

the relevant part of marked-up_text.cpp (line 222) contains:

        return draw_text(gui != NULL ? gui->getSurface() : NULL, area,
size, colour, txt, x, y, use_tooltips, style);


Is there some syntax I can add/modify to this statement that will
clear up the ambiguity the compiler is complaining about?

Thanks, Jake


More information about the maintainers mailing list