瀏覽代碼

fix: BuildThis.cpp compilation warning after develop merge

Mircea TheHonestCTO 2 月之前
父節點
當前提交
8674099102
共有 1 個文件被更改,包括 2 次插入5 次删除
  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:
 			case EBuildingState::ALLOWED:
 				town = candidateTown;
 				town = candidateTown;
 				break; //TODO: look for prerequisites? this is not our responsibility
 				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;
 			auto res = town->getTown()->buildings.at(BuildingID(bid))->resources;
 			return ai->ah->whatToDo(res, iAmElementar()); //realize immediately or gather resources
 			return ai->ah->whatToDo(res, iAmElementar()); //realize immediately or gather resources
 		}
 		}
-		break;
 		default:
 		default:
 			throw cannotFulfillGoalException("Not possible to build");
 			throw cannotFulfillGoalException("Not possible to build");
 		}
 		}
 	}
 	}
-	else
-		throw cannotFulfillGoalException("Cannot find town to build this");
+	throw cannotFulfillGoalException("Cannot find town to build this");
 }
 }