Mercurial > hg > openttd
changeset 17150:47d33cf95c70 draft
(svn r21888) -Codechange: remove some unneeded (for the AI header) headers from some AI headers, reducing the include tree
line wrap: on
line diff
--- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -13,6 +13,7 @@ #include "../openttd.h" #include "../settings_type.h" #include "../core/random_func.hpp" +#include "../core/math_func.hpp" #include "ai.hpp" #include "ai_config.hpp"
--- a/src/ai/api/ai_accounting.cpp +++ b/src/ai/api/ai_accounting.cpp @@ -9,6 +9,7 @@ /** @file ai_accounting.cpp Implementation of AIAccounting. */ +#include "../../stdafx.h" #include "ai_accounting.hpp" Money AIAccounting::GetCosts()
--- a/src/ai/api/ai_accounting.hpp +++ b/src/ai/api/ai_accounting.hpp @@ -12,6 +12,7 @@ #ifndef AI_ACCOUNTING_HPP #define AI_ACCOUNTING_HPP +#include "../../stdafx.h" #include "ai_object.hpp" /**
--- a/src/ai/api/ai_airport.cpp +++ b/src/ai/api/ai_airport.cpp @@ -9,6 +9,7 @@ /** @file ai_airport.cpp Implementation of AIAirport. */ +#include "../../stdafx.h" #include "ai_airport.hpp" #include "ai_station.hpp" #include "../../station_base.h"
--- a/src/ai/api/ai_base.cpp +++ b/src/ai/api/ai_base.cpp @@ -9,6 +9,7 @@ /** @file ai_base.cpp Implementation of AIBase. */ +#include "../../stdafx.h" #include "ai_base.hpp" #include "../../network/network.h" #include "../../core/random_func.hpp"
--- a/src/ai/api/ai_basestation.cpp +++ b/src/ai/api/ai_basestation.cpp @@ -9,6 +9,7 @@ /** @file ai_basestation.cpp Implementation of AIBaseStation. */ +#include "../../stdafx.h" #include "ai_basestation.hpp" #include "../../station_base.h" #include "../../string_func.h"
--- a/src/ai/api/ai_basestation.hpp +++ b/src/ai/api/ai_basestation.hpp @@ -12,7 +12,6 @@ #ifndef AI_BASESTATION_HPP #define AI_BASESTATION_HPP -#include "ai_object.hpp" #include "ai_error.hpp" /**
--- a/src/ai/api/ai_bridge.cpp +++ b/src/ai/api/ai_bridge.cpp @@ -9,6 +9,7 @@ /** @file ai_bridge.cpp Implementation of AIBridge. */ +#include "../../stdafx.h" #include "ai_bridge.hpp" #include "ai_rail.hpp" #include "../ai_instance.hpp"
--- a/src/ai/api/ai_bridge.hpp +++ b/src/ai/api/ai_bridge.hpp @@ -12,9 +12,7 @@ #ifndef AI_BRIDGE_HPP #define AI_BRIDGE_HPP -#include "ai_object.hpp" #include "ai_vehicle.hpp" -#include "ai_error.hpp" /** * Class that handles all bridge related functions.
--- a/src/ai/api/ai_bridgelist.cpp +++ b/src/ai/api/ai_bridgelist.cpp @@ -9,6 +9,7 @@ /** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */ +#include "../../stdafx.h" #include "ai_bridgelist.hpp" #include "ai_bridge.hpp" #include "../../bridge.h"
--- a/src/ai/api/ai_cargo.cpp +++ b/src/ai/api/ai_cargo.cpp @@ -9,6 +9,7 @@ /** @file ai_cargo.cpp Implementation of AICargo. */ +#include "../../stdafx.h" #include "ai_cargo.hpp" #include "../../cargotype.h" #include "../../economy_func.h"
--- a/src/ai/api/ai_cargolist.cpp +++ b/src/ai/api/ai_cargolist.cpp @@ -9,6 +9,7 @@ /** @file ai_cargolist.cpp Implementation of AICargoList and friends. */ +#include "../../stdafx.h" #include "ai_cargolist.hpp" #include "ai_industry.hpp" #include "../../cargotype.h"
--- a/src/ai/api/ai_company.cpp +++ b/src/ai/api/ai_company.cpp @@ -9,6 +9,7 @@ /** @file ai_company.cpp Implementation of AICompany. */ +#include "../../stdafx.h" #include "ai_company.hpp" #include "ai_error.hpp" #include "../../command_func.h"
--- a/src/ai/api/ai_controller.cpp +++ b/src/ai/api/ai_controller.cpp @@ -10,6 +10,7 @@ /** @file ai_controller.cpp Implementation of AIControler. */ #include "../../stdafx.h" +#include "../../stdafx.h" #include "../../string_func.h" #include "../../company_base.h" #include "../../rev.h"
--- a/src/ai/api/ai_date.cpp +++ b/src/ai/api/ai_date.cpp @@ -9,6 +9,7 @@ /** @file ai_date.cpp Implementation of AIDate. */ +#include "../../stdafx.h" #include "ai_date.hpp" #include "../../date_func.h"
--- a/src/ai/api/ai_depotlist.cpp +++ b/src/ai/api/ai_depotlist.cpp @@ -9,6 +9,7 @@ /** @file ai_depotlist.cpp Implementation of AIDepotList and friends. */ +#include "../../stdafx.h" #include "ai_depotlist.hpp" #include "../../company_func.h" #include "../../depot_base.h"
--- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -9,6 +9,7 @@ /** @file ai_engine.cpp Implementation of AIEngine. */ +#include "../../stdafx.h" #include "ai_engine.hpp" #include "ai_cargo.hpp" #include "../../company_func.h"
--- a/src/ai/api/ai_enginelist.cpp +++ b/src/ai/api/ai_enginelist.cpp @@ -9,6 +9,7 @@ /** @file ai_enginelist.cpp Implementation of AIEngineList and friends. */ +#include "../../stdafx.h" #include "ai_enginelist.hpp" #include "../../company_func.h" #include "../../engine_base.h"
--- a/src/ai/api/ai_error.cpp +++ b/src/ai/api/ai_error.cpp @@ -9,6 +9,7 @@ /** @file ai_error.cpp Implementation of AIError. */ +#include "../../stdafx.h" #include "ai_error.hpp" #include "../../core/bitmath_func.hpp"
--- a/src/ai/api/ai_event.cpp +++ b/src/ai/api/ai_event.cpp @@ -9,6 +9,7 @@ /** @file ai_event.cpp Implementation of AIEvent. */ +#include "../../stdafx.h" #include "ai_event_types.hpp" #include <queue>
--- a/src/ai/api/ai_event_types.cpp +++ b/src/ai/api/ai_event_types.cpp @@ -9,6 +9,7 @@ /** @file ai_event_types.cpp Implementation of all EventTypes. */ +#include "../../stdafx.h" #include "ai_event_types.hpp" #include "ai_vehicle.hpp" #include "../../command_type.h"
--- a/src/ai/api/ai_execmode.cpp +++ b/src/ai/api/ai_execmode.cpp @@ -9,6 +9,7 @@ /** @file ai_execmode.cpp Implementation of AIExecMode. */ +#include "../../stdafx.h" #include "ai_execmode.hpp" #include "../../company_base.h" #include "../../company_func.h"
--- a/src/ai/api/ai_gamesettings.cpp +++ b/src/ai/api/ai_gamesettings.cpp @@ -9,6 +9,7 @@ /** @file ai_gamesettings.cpp Implementation of AIGameSettings. */ +#include "../../stdafx.h" #include "ai_gamesettings.hpp" #include "../../settings_internal.h"
--- a/src/ai/api/ai_gamesettings.hpp +++ b/src/ai/api/ai_gamesettings.hpp @@ -12,7 +12,6 @@ #ifndef AI_GAMESETTINGS_HPP #define AI_GAMESETTINGS_HPP -#include "ai_object.hpp" #include "ai_vehicle.hpp" /**
--- a/src/ai/api/ai_group.cpp +++ b/src/ai/api/ai_group.cpp @@ -9,6 +9,7 @@ /** @file ai_group.cpp Implementation of AIGroup. */ +#include "../../stdafx.h" #include "ai_group.hpp" #include "ai_engine.hpp" #include "../ai_instance.hpp"
--- a/src/ai/api/ai_grouplist.cpp +++ b/src/ai/api/ai_grouplist.cpp @@ -9,6 +9,7 @@ /** @file ai_grouplist.cpp Implementation of AIGroupList and friends. */ +#include "../../stdafx.h" #include "ai_grouplist.hpp" #include "../../company_func.h" #include "../../group.h"
--- a/src/ai/api/ai_industry.cpp +++ b/src/ai/api/ai_industry.cpp @@ -9,6 +9,7 @@ /** @file ai_industry.cpp Implementation of AIIndustry. */ +#include "../../stdafx.h" #include "ai_industry.hpp" #include "ai_cargo.hpp" #include "ai_map.hpp"
--- a/src/ai/api/ai_industrylist.cpp +++ b/src/ai/api/ai_industrylist.cpp @@ -9,6 +9,7 @@ /** @file ai_industrylist.cpp Implementation of AIIndustryList and friends. */ +#include "../../stdafx.h" #include "ai_industrylist.hpp" #include "../../industry.h"
--- a/src/ai/api/ai_industrytype.cpp +++ b/src/ai/api/ai_industrytype.cpp @@ -9,8 +9,10 @@ /** @file ai_industrytype.cpp Implementation of AIIndustryType. */ +#include "../../stdafx.h" #include "ai_industrytype.hpp" #include "ai_map.hpp" +#include "ai_error.hpp" #include "../../strings_func.h" #include "../../industry.h" #include "../../newgrf_industries.h"
--- a/src/ai/api/ai_industrytype.hpp +++ b/src/ai/api/ai_industrytype.hpp @@ -12,8 +12,6 @@ #ifndef AI_INDUSTRYTYPE_HPP #define AI_INDUSTRYTYPE_HPP -#include "ai_object.hpp" -#include "ai_error.hpp" #include "ai_list.hpp" /**
--- a/src/ai/api/ai_industrytypelist.cpp +++ b/src/ai/api/ai_industrytypelist.cpp @@ -9,6 +9,7 @@ /** @file ai_industrytypelist.cpp Implementation of AIIndustryTypeList. */ +#include "../../stdafx.h" #include "ai_industrytypelist.hpp" #include "../../industry.h"
--- a/src/ai/api/ai_list.cpp +++ b/src/ai/api/ai_list.cpp @@ -9,6 +9,7 @@ /** @file ai_list.cpp Implementation of AIList. */ +#include "../../stdafx.h" #include "ai_list.hpp" #include "../../debug.h" #include "../../script/squirrel.hpp"
--- a/src/ai/api/ai_log.cpp +++ b/src/ai/api/ai_log.cpp @@ -9,6 +9,7 @@ /** @file ai_log.cpp Implementation of AILog. */ +#include "../../stdafx.h" #include "ai_log.hpp" #include "../../core/alloc_func.hpp" #include "../../company_func.h"
--- a/src/ai/api/ai_map.cpp +++ b/src/ai/api/ai_map.cpp @@ -9,6 +9,7 @@ /** @file ai_map.cpp Implementation of AIMap. */ +#include "../../stdafx.h" #include "ai_map.hpp" #include "../../tile_map.h"
--- a/src/ai/api/ai_marine.cpp +++ b/src/ai/api/ai_marine.cpp @@ -9,6 +9,7 @@ /** @file ai_marine.cpp Implementation of AIMarine. */ +#include "../../stdafx.h" #include "ai_marine.hpp" #include "ai_station.hpp" #include "../../station_base.h"
--- a/src/ai/api/ai_marine.hpp +++ b/src/ai/api/ai_marine.hpp @@ -12,7 +12,6 @@ #ifndef AI_MARINE_HPP #define AI_MARINE_HPP -#include "ai_object.hpp" #include "ai_error.hpp" /**
--- a/src/ai/api/ai_object.hpp +++ b/src/ai/api/ai_object.hpp @@ -12,7 +12,6 @@ #ifndef AI_OBJECT_HPP #define AI_OBJECT_HPP -#include "../../stdafx.h" #include "../../misc/countedptr.hpp" #include "../../road_type.h" #include "../../rail_type.h"
--- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -9,6 +9,7 @@ /** @file ai_order.cpp Implementation of AIOrder. */ +#include "../../stdafx.h" #include "ai_vehicle.hpp" #include "../ai_instance.hpp" #include "../../debug.h"
--- a/src/ai/api/ai_order.hpp +++ b/src/ai/api/ai_order.hpp @@ -12,7 +12,6 @@ #ifndef AI_ORDER_HPP #define AI_ORDER_HPP -#include "ai_object.hpp" #include "ai_error.hpp" /**
--- a/src/ai/api/ai_rail.cpp +++ b/src/ai/api/ai_rail.cpp @@ -9,6 +9,7 @@ /** @file ai_rail.cpp Implementation of AIRail. */ +#include "../../stdafx.h" #include "ai_rail.hpp" #include "ai_map.hpp" #include "ai_station.hpp"
--- a/src/ai/api/ai_rail.hpp +++ b/src/ai/api/ai_rail.hpp @@ -12,8 +12,6 @@ #ifndef AI_RAIL_HPP #define AI_RAIL_HPP -#include "ai_object.hpp" -#include "ai_error.hpp" #include "ai_tile.hpp" /**
--- a/src/ai/api/ai_railtypelist.cpp +++ b/src/ai/api/ai_railtypelist.cpp @@ -9,6 +9,7 @@ /** @file ai_railtypelist.cpp Implementation of AIRailTypeList and friends. */ +#include "../../stdafx.h" #include "ai_railtypelist.hpp" #include "../../rail.h" #include "../../company_func.h"
--- a/src/ai/api/ai_road.cpp +++ b/src/ai/api/ai_road.cpp @@ -9,6 +9,7 @@ /** @file ai_road.cpp Implementation of AIRoad. */ +#include "../../stdafx.h" #include "ai_map.hpp" #include "ai_station.hpp" #include "ai_cargo.hpp"
--- a/src/ai/api/ai_road.hpp +++ b/src/ai/api/ai_road.hpp @@ -12,8 +12,6 @@ #ifndef AI_ROAD_HPP #define AI_ROAD_HPP -#include "ai_object.hpp" -#include "ai_error.hpp" #include "ai_tile.hpp" /**
--- a/src/ai/api/ai_sign.cpp +++ b/src/ai/api/ai_sign.cpp @@ -9,6 +9,7 @@ /** @file ai_sign.cpp Implementation of AISign. */ +#include "../../stdafx.h" #include "ai_sign.hpp" #include "table/strings.h" #include "../ai_instance.hpp"
--- a/src/ai/api/ai_signlist.cpp +++ b/src/ai/api/ai_signlist.cpp @@ -9,6 +9,7 @@ /** @file ai_signlist.cpp Implementation of AISignList and friends. */ +#include "../../stdafx.h" #include "ai_signlist.hpp" #include "ai_sign.hpp" #include "../../signs_base.h"
--- a/src/ai/api/ai_station.cpp +++ b/src/ai/api/ai_station.cpp @@ -9,6 +9,7 @@ /** @file ai_station.cpp Implementation of AIStation. */ +#include "../../stdafx.h" #include "ai_station.hpp" #include "ai_cargo.hpp" #include "ai_map.hpp"
--- a/src/ai/api/ai_stationlist.cpp +++ b/src/ai/api/ai_stationlist.cpp @@ -9,6 +9,7 @@ /** @file ai_stationlist.cpp Implementation of AIStationList and friends. */ +#include "../../stdafx.h" #include "ai_stationlist.hpp" #include "ai_vehicle.hpp" #include "../../company_func.h"
--- a/src/ai/api/ai_subsidy.cpp +++ b/src/ai/api/ai_subsidy.cpp @@ -9,6 +9,7 @@ /** @file ai_subsidy.cpp Implementation of AISubsidy. */ +#include "../../stdafx.h" #include "ai_subsidy.hpp" #include "ai_date.hpp" #include "../../subsidy_base.h"
--- a/src/ai/api/ai_subsidylist.cpp +++ b/src/ai/api/ai_subsidylist.cpp @@ -9,6 +9,7 @@ /** @file ai_subsidylist.cpp Implementation of AISubsidyList. */ +#include "../../stdafx.h" #include "ai_subsidylist.hpp" #include "../../subsidy_base.h"
--- a/src/ai/api/ai_testmode.cpp +++ b/src/ai/api/ai_testmode.cpp @@ -9,6 +9,7 @@ /** @file ai_testmode.cpp Implementation of AITestMode. */ +#include "../../stdafx.h" #include "ai_testmode.hpp" #include "../../company_base.h" #include "../../company_func.h"
--- a/src/ai/api/ai_tile.cpp +++ b/src/ai/api/ai_tile.cpp @@ -9,6 +9,7 @@ /** @file ai_tile.cpp Implementation of AITile. */ +#include "../../stdafx.h" #include "ai_tile.hpp" #include "ai_map.hpp" #include "ai_town.hpp"
--- a/src/ai/api/ai_tile.hpp +++ b/src/ai/api/ai_tile.hpp @@ -12,7 +12,6 @@ #ifndef AI_TILE_HPP #define AI_TILE_HPP -#include "ai_list.hpp" #include "ai_error.hpp" #include "ai_company.hpp"
--- a/src/ai/api/ai_tilelist.cpp +++ b/src/ai/api/ai_tilelist.cpp @@ -9,6 +9,7 @@ /** @file ai_tilelist.cpp Implementation of AITileList and friends. */ +#include "../../stdafx.h" #include "ai_tilelist.hpp" #include "ai_industry.hpp" #include "../../industry.h"
--- a/src/ai/api/ai_tilelist.hpp +++ b/src/ai/api/ai_tilelist.hpp @@ -12,8 +12,8 @@ #ifndef AI_TILELIST_HPP #define AI_TILELIST_HPP +#include "ai_station.hpp" #include "ai_list.hpp" -#include "ai_station.hpp" /** * Creates an empty list, in which you can add tiles.
--- a/src/ai/api/ai_town.cpp +++ b/src/ai/api/ai_town.cpp @@ -9,6 +9,7 @@ /** @file ai_town.cpp Implementation of AITown. */ +#include "../../stdafx.h" #include "ai_town.hpp" #include "ai_map.hpp" #include "ai_cargo.hpp"
--- a/src/ai/api/ai_town.hpp +++ b/src/ai/api/ai_town.hpp @@ -12,7 +12,6 @@ #ifndef AI_TOWN_HPP #define AI_TOWN_HPP -#include "ai_object.hpp" #include "ai_company.hpp" /**
--- a/src/ai/api/ai_townlist.cpp +++ b/src/ai/api/ai_townlist.cpp @@ -9,6 +9,7 @@ /** @file ai_townlist.cpp Implementation of AITownList and friends. */ +#include "../../stdafx.h" #include "ai_townlist.hpp" #include "../../town.h"
--- a/src/ai/api/ai_tunnel.cpp +++ b/src/ai/api/ai_tunnel.cpp @@ -9,6 +9,7 @@ /** @file ai_tunnel.cpp Implementation of AITunnel. */ +#include "../../stdafx.h" #include "ai_tunnel.hpp" #include "ai_rail.hpp" #include "../ai_instance.hpp"
--- a/src/ai/api/ai_vehicle.cpp +++ b/src/ai/api/ai_vehicle.cpp @@ -9,6 +9,7 @@ /** @file ai_vehicle.cpp Implementation of AIVehicle. */ +#include "../../stdafx.h" #include "ai_engine.hpp" #include "ai_cargo.hpp" #include "ai_gamesettings.hpp"
--- a/src/ai/api/ai_vehiclelist.cpp +++ b/src/ai/api/ai_vehiclelist.cpp @@ -9,6 +9,7 @@ /** @file ai_vehiclelist.cpp Implementation of AIVehicleList and friends. */ +#include "../../stdafx.h" #include "ai_vehiclelist.hpp" #include "ai_group.hpp" #include "ai_map.hpp"
--- a/src/ai/api/ai_waypoint.cpp +++ b/src/ai/api/ai_waypoint.cpp @@ -9,6 +9,7 @@ /** @file ai_waypoint.cpp Implementation of AIWaypoint. */ +#include "../../stdafx.h" #include "ai_waypoint.hpp" #include "ai_rail.hpp" #include "ai_marine.hpp"