Procházet zdrojové kódy

fix: BuildThis.cpp compilation warning after develop merge

Mircea TheHonestCTO před 2 měsíci
rodič
revize
8674099102
1 změnil soubory, kde provedl 2 přidání a 5 odebrání
  1. 2 5
      AI/VCAI/Goals/BuildThis.cpp

+ 2 - 5
AI/VCAI/Goals/BuildThis.cpp

@@ -43,8 +43,7 @@ TSubgoal BuildThis::whatToDoToAchieve()
 			case EBuildingState::ALLOWED:
 				town = candidateTown;
 				break; //TODO: look for prerequisites? this is not our responsibility
-			default:
-				continue;
+			default:;
 			}
 		}
 	}
@@ -59,11 +58,9 @@ TSubgoal BuildThis::whatToDoToAchieve()
 			auto res = town->getTown()->buildings.at(BuildingID(bid))->resources;
 			return ai->ah->whatToDo(res, iAmElementar()); //realize immediately or gather resources
 		}
-		break;
 		default:
 			throw cannotFulfillGoalException("Not possible to build");
 		}
 	}
-	else
-		throw cannotFulfillGoalException("Cannot find town to build this");
+	throw cannotFulfillGoalException("Cannot find town to build this");
 }