Browse Source

Some compile fixes.

Frank Zago 14 năm trước cách đây
mục cha
commit
abc0d3537e
3 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 2 2
      client/CBattleInterface.cpp
  2. 2 2
      lib/ERMInterpreter.cpp
  3. 1 1
      lib/ERMInterpreter.h

+ 2 - 2
client/CBattleInterface.cpp

@@ -3424,10 +3424,10 @@ void CBattleInterface::showPieceOfWall(SDL_Surface * to, int hex, const std::vec
 		return;
 
 	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));
 
-	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())
 	{
 		BOOST_FOREACH(int wallNum, it->second)

+ 2 - 2
lib/ERMInterpreter.cpp

@@ -653,7 +653,7 @@ struct StandardReceiverVisitor : boost::static_visitor<>
 		{
 			ERM::TBodyOptionItem boi = params[0];
 			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
 			throw EScriptExecError("This receiver option takes exactly 1 parameter!");
@@ -671,7 +671,7 @@ struct StandardReceiverVisitor : boost::static_visitor<>
 			{
 			case 0:
 				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;
 			default:
 				throw EScriptExecError("Wrong number of option code!");

+ 1 - 1
lib/ERMInterpreter.h

@@ -551,6 +551,6 @@ public:
 		if(obj)
 			return obj;
 		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!");
 	}
 };