widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03257
Re: [Merge] lp:~widelands-dev/widelands/seafaring-ai into lp:widelands
> //ref_cast<ConstructionSite const, Building const>(b).building().name().c_str());
> dynamic_cast<const ConstructionSite&>((b).building().name().c_str()));
>
> commented out is before, the second one is what I want to use. Before it used to compile, now it complains:
>
> defaultai.cc:3766:48: error: 'const class Widelands::Building' has no member named 'building'
>
> Can you see any problem here?
You are casting everything instead of just the construction site. Try this:
dynamic_cast<const ConstructionSite&>(b).building().name().c_str());
--
https://code.launchpad.net/~widelands-dev/widelands/seafaring-ai/+merge/242271
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/seafaring-ai into lp:widelands.
References