1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Some compile fixes.

This commit is contained in:
Frank Zago 2011-05-27 13:49:18 +00:00
parent 7962a9bc47
commit abc0d3537e
3 changed files with 5 additions and 5 deletions

View File

@ -3424,10 +3424,10 @@ void CBattleInterface::showPieceOfWall(SDL_Surface * to, int hex, const std::vec
return; return;
using namespace boost::assign; using namespace boost::assign;
static const std::map<int, std::list<int>> hexToPart = map_list_of<int, std::list<int>>(12, list_of<int>(8)(1)(7))(45, list_of<int>(12)(6)) static const std::map<int, std::list<int> > hexToPart = map_list_of<int, std::list<int> >(12, list_of<int>(8)(1)(7))(45, list_of<int>(12)(6))
/*gate (78, list_of<int>(9))*/(101, list_of<int>(10))(118, list_of<int>(2))(165, list_of<int>(11))(186, list_of<int>(3)); /*gate (78, list_of<int>(9))*/(101, list_of<int>(10))(118, list_of<int>(2))(165, list_of<int>(11))(186, list_of<int>(3));
std::map<int, std::list<int>>::const_iterator it = hexToPart.find(hex); std::map<int, std::list<int> >::const_iterator it = hexToPart.find(hex);
if(it != hexToPart.end()) if(it != hexToPart.end())
{ {
BOOST_FOREACH(int wallNum, it->second) BOOST_FOREACH(int wallNum, it->second)

View File

@ -653,7 +653,7 @@ struct StandardReceiverVisitor : boost::static_visitor<>
{ {
ERM::TBodyOptionItem boi = params[0]; ERM::TBodyOptionItem boi = params[0];
boost::apply_visitor( boost::apply_visitor(
OptionPerformer(*const_cast<OptionPerformer::TReceiverType*>(static_cast<const OptionPerformer::TReceiverType*>(this))), boi); OptionPerformer(*const_cast<typename OptionPerformer::TReceiverType*>(static_cast<const typename OptionPerformer::TReceiverType*>(this))), boi);
} }
else else
throw EScriptExecError("This receiver option takes exactly 1 parameter!"); throw EScriptExecError("This receiver option takes exactly 1 parameter!");
@ -671,7 +671,7 @@ struct StandardReceiverVisitor : boost::static_visitor<>
{ {
case 0: case 0:
boost::apply_visitor( boost::apply_visitor(
OptionPerformer<0>(*const_cast<OptionPerformer<0>::TReceiverType*>(static_cast<const OptionPerformer<0>::TReceiverType*>(this))), boi); OptionPerformer<0>(*const_cast<typename OptionPerformer<0>::TReceiverType*>(static_cast<const typename OptionPerformer<0>::TReceiverType*>(this))), boi);
break; break;
default: default:
throw EScriptExecError("Wrong number of option code!"); throw EScriptExecError("Wrong number of option code!");

View File

@ -551,6 +551,6 @@ public:
if(obj) if(obj)
return obj; return obj;
else else
throw EScriptExecError("Wrong cast attempted, object is not of a desired type!"); throw VERMInterpreter::EScriptExecError("Wrong cast attempted, object is not of a desired type!");
} }
}; };