(svn r12433) [NoAI] -Fix r12431: cast values to avoid warnings (tnx glx) noai
authortruebrain
Wed, 26 Mar 2008 15:30:02 +0000
branchnoai
changeset 9824 2c2a5a27c4eb
parent 9823 0b7f816cf46f
child 9825 cc77111ebd85
(svn r12433) [NoAI] -Fix r12431: cast values to avoid warnings (tnx glx)
src/ai/api/ai_event_types.hpp
--- a/src/ai/api/ai_event_types.hpp	Wed Mar 26 15:17:40 2008 +0000
+++ b/src/ai/api/ai_event_types.hpp	Wed Mar 26 15:30:02 2008 +0000
@@ -127,25 +127,25 @@
 	 * Get the TownID from where you need to move the cargo.
 	 * @return Either the TownID, or AITown::IsValidTown() returns false.
 	 */
-	TownID GetFromTownID() { return from_town ? from : -1; }
+	TownID GetFromTownID() { return from_town ? from : (TownID)-1; }
 
 	/**
 	 * Get the TownID to where you need to move the cargo.
 	 * @return Either the TownID, or AITown::IsValidTown() returns false.
 	 */
-	TownID GetToTownID() { return to_town ? to : -1; }
+	TownID GetToTownID() { return to_town ? to : (TownID)-1; }
 
 	/**
 	 * Get the IndustryID from where you need to move the cargo.
 	 * @return Either the IndustryID, or AIIndustry::IsValidIndustry() returns false.
 	 */
-	IndustryID GetFromIndustryID() { return from_town ? -1 : from; }
+	IndustryID GetFromIndustryID() { return from_town ? (IndustryID)-1 : from; }
 
 	/**
 	 * Get the IndustryID to where you need to move the cargo.
 	 * @return Either the IndustryID, or AIIndustry::IsValidIndustry() returns false.
 	 */
-	IndustryID GetToIndustryID() { return to_town ? -1 : to; }
+	IndustryID GetToIndustryID() { return to_town ? (IndustryID)-1 : to; }
 
 private:
 	CargoID cargo;