diff --git a/src/db-copy.cpp b/src/db-copy.cpp index a58a9aea3..96fcf8c18 100644 --- a/src/db-copy.cpp +++ b/src/db-copy.cpp @@ -7,13 +7,17 @@ * For a full list of authors see the git log. */ -#include - #include "db-copy.hpp" + #include "format.hpp" #include "logging.hpp" #include "pgsql.hpp" +#include +#include +#include +#include + void db_deleter_by_id_t::delete_rows(std::string const &table, std::string const &column, pg_conn_t const &db_connection) diff --git a/src/db-copy.hpp b/src/db-copy.hpp index bd5946a0d..beebc8155 100644 --- a/src/db-copy.hpp +++ b/src/db-copy.hpp @@ -10,6 +10,10 @@ * For a full list of authors see the git log. */ +#include "osmtypes.hpp" +#include "pgsql.hpp" +#include "pgsql-params.hpp" + #include #include #include @@ -22,9 +26,6 @@ #include #include -#include "osmtypes.hpp" -#include "pgsql.hpp" - /** * Table information necessary for building SQL queries. */ diff --git a/src/debug-output.cpp b/src/debug-output.cpp index 3ee119d2c..c8a94d19b 100644 --- a/src/debug-output.cpp +++ b/src/debug-output.cpp @@ -9,6 +9,8 @@ #include "debug-output.hpp" +#include "expire-output.hpp" +#include "flex-table.hpp" #include "logging.hpp" void write_expire_output_list_to_debug_log( diff --git a/src/debug-output.hpp b/src/debug-output.hpp index e4777221e..96256a5d7 100644 --- a/src/debug-output.hpp +++ b/src/debug-output.hpp @@ -10,8 +10,10 @@ * For a full list of authors see the git log. */ -#include "expire-output.hpp" -#include "flex-table.hpp" +#include + +class expire_output_t; +class flex_table_t; void write_expire_output_list_to_debug_log( std::vector const &expire_outputs); diff --git a/src/expire-output.cpp b/src/expire-output.cpp index 68d2ac372..5ec48d9f2 100644 --- a/src/expire-output.cpp +++ b/src/expire-output.cpp @@ -14,6 +14,7 @@ #include "pgsql.hpp" #include "tile.hpp" +#include #include std::size_t diff --git a/src/expire-output.hpp b/src/expire-output.hpp index 1c9821617..cbfa92869 100644 --- a/src/expire-output.hpp +++ b/src/expire-output.hpp @@ -13,6 +13,7 @@ #include "tile.hpp" #include +#include #include #include #include diff --git a/src/flex-lua-index.cpp b/src/flex-lua-index.cpp index 085b360f5..5db9db648 100644 --- a/src/flex-lua-index.cpp +++ b/src/flex-lua-index.cpp @@ -8,11 +8,15 @@ */ #include "flex-lua-index.hpp" + +#include "flex-index.hpp" +#include "flex-table.hpp" +#include "format.hpp" #include "lua-utils.hpp" -#include "output-flex.hpp" #include "pgsql-capabilities.hpp" #include "util.hpp" +#include #include #include diff --git a/src/flex-table-column.cpp b/src/flex-table-column.cpp index 489cd722e..7cf561dbc 100644 --- a/src/flex-table-column.cpp +++ b/src/flex-table-column.cpp @@ -13,7 +13,6 @@ #include "pgsql-capabilities.hpp" #include "util.hpp" -#include #include #include #include diff --git a/src/flex-table.hpp b/src/flex-table.hpp index 4973fe20a..f45b0057c 100644 --- a/src/flex-table.hpp +++ b/src/flex-table.hpp @@ -20,7 +20,10 @@ #include +#include +#include #include +#include #include #include #include diff --git a/src/flex-write.hpp b/src/flex-write.hpp index 999923530..a8536d4fa 100644 --- a/src/flex-write.hpp +++ b/src/flex-write.hpp @@ -10,12 +10,15 @@ * For a full list of authors see the git log. */ -#include "expire-tiles.hpp" #include "flex-table.hpp" #include #include +#include +#include + +class expire_tiles; class not_null_exception : public std::runtime_error { diff --git a/src/gen/canvas.cpp b/src/gen/canvas.cpp index 8978c4ffc..e88095563 100644 --- a/src/gen/canvas.cpp +++ b/src/gen/canvas.cpp @@ -10,10 +10,13 @@ #include "canvas.hpp" #include "raster.hpp" +#include "tile.hpp" #include #include +#include + void canvas_t::open_close(unsigned int buffer_size) { auto const kernel1 = cv::getStructuringElement( diff --git a/src/gen/canvas.hpp b/src/gen/canvas.hpp index c184af827..5ccaa906d 100644 --- a/src/gen/canvas.hpp +++ b/src/gen/canvas.hpp @@ -11,11 +11,14 @@ */ #include "geom.hpp" -#include "tile.hpp" #include #include +#include +#include + +class tile_t; /** * This class wraps the image class from the OpenCV library. diff --git a/src/gen/gen-base.cpp b/src/gen/gen-base.cpp index d883eb1e2..f71c13f9b 100644 --- a/src/gen/gen-base.cpp +++ b/src/gen/gen-base.cpp @@ -14,6 +14,8 @@ #include +#include + gen_base_t::gen_base_t(pg_conn_t *connection, bool append, params_t *params) : m_connection(connection), m_params(params), m_append(append) { diff --git a/src/gen/gen-base.hpp b/src/gen/gen-base.hpp index 3117b968c..90e8ae37f 100644 --- a/src/gen/gen-base.hpp +++ b/src/gen/gen-base.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include class params_t; diff --git a/src/gen/gen-create.cpp b/src/gen/gen-create.cpp index 195f59c16..32d6487ad 100644 --- a/src/gen/gen-create.cpp +++ b/src/gen/gen-create.cpp @@ -9,6 +9,8 @@ #include "gen-create.hpp" +#include "format.hpp" +#include "gen-base.hpp" #include "gen-discrete-isolation.hpp" #include "gen-rivers.hpp" #include "gen-tile-builtup.hpp" diff --git a/src/gen/gen-create.hpp b/src/gen/gen-create.hpp index b7997bb3c..a445a9455 100644 --- a/src/gen/gen-create.hpp +++ b/src/gen/gen-create.hpp @@ -10,11 +10,10 @@ * For a full list of authors see the git log. */ -#include "gen-base.hpp" - #include #include +class gen_base_t; class params_t; class pg_conn_t; diff --git a/src/gen/gen-discrete-isolation.cpp b/src/gen/gen-discrete-isolation.cpp index a713091c9..6c8ca8a55 100644 --- a/src/gen/gen-discrete-isolation.cpp +++ b/src/gen/gen-discrete-isolation.cpp @@ -9,12 +9,14 @@ #include "gen-discrete-isolation.hpp" -#include "logging.hpp" #include "params.hpp" #include "pgsql.hpp" #include "util.hpp" #include +#include +#include +#include #include gen_di_t::gen_di_t(pg_conn_t *connection, bool append, params_t *params) @@ -115,7 +117,7 @@ FROM {src} WHERE {importance_column} > 0 min = dist; } } - data[n].di = sqrt(min); + data[n].di = std::sqrt(min); } data[0].di = data[1].di + 1; } diff --git a/src/gen/gen-discrete-isolation.hpp b/src/gen/gen-discrete-isolation.hpp index 29d680b9a..d6d5c2725 100644 --- a/src/gen/gen-discrete-isolation.hpp +++ b/src/gen/gen-discrete-isolation.hpp @@ -12,8 +12,12 @@ #include "gen-base.hpp" +#include #include +class params_t; +class pg_conn_t; + class gen_di_t : public gen_base_t { public: diff --git a/src/gen/gen-rivers.hpp b/src/gen/gen-rivers.hpp index 3cd351ce5..513da5786 100644 --- a/src/gen/gen-rivers.hpp +++ b/src/gen/gen-rivers.hpp @@ -12,8 +12,12 @@ #include "gen-base.hpp" +#include #include +class params_t; +class pg_conn_t; + class gen_rivers_t : public gen_base_t { public: diff --git a/src/gen/osm2pgsql-gen.cpp b/src/gen/osm2pgsql-gen.cpp index c3292da22..5ba2b245a 100644 --- a/src/gen/osm2pgsql-gen.cpp +++ b/src/gen/osm2pgsql-gen.cpp @@ -15,7 +15,6 @@ * in the future. */ -#include "canvas.hpp" #include "command-line-app.hpp" #include "debug-output.hpp" #include "expire-output.hpp" @@ -30,7 +29,6 @@ #include "lua-init.hpp" #include "lua-setup.hpp" #include "lua-utils.hpp" -#include "options.hpp" #include "params.hpp" #include "pgsql-capabilities.hpp" #include "pgsql.hpp" @@ -45,18 +43,16 @@ #include #include -#include #include -#include #include #include #include -#include -#include -#include +#include +#include #include #include #include +#include // Lua can't call functions on C++ objects directly. This macro defines simple // C "trampoline" functions which are called from Lua which get the current diff --git a/src/gen/tracer.cpp b/src/gen/tracer.cpp index 027fb3415..7673bf024 100644 --- a/src/gen/tracer.cpp +++ b/src/gen/tracer.cpp @@ -9,7 +9,9 @@ #include "tracer.hpp" +#include "canvas.hpp" #include "geom-boost-adaptor.hpp" +#include "tile.hpp" #include #include diff --git a/src/gen/tracer.hpp b/src/gen/tracer.hpp index 141cdea93..d07910883 100644 --- a/src/gen/tracer.hpp +++ b/src/gen/tracer.hpp @@ -10,15 +10,17 @@ * For a full list of authors see the git log. */ -#include "canvas.hpp" #include "geom.hpp" -#include "tile.hpp" #include +#include #include #include +class canvas_t; +class tile_t; + class tracer_t { public: diff --git a/src/geom-box.cpp b/src/geom-box.cpp index a5f8217fd..9393e8ce8 100644 --- a/src/geom-box.cpp +++ b/src/geom-box.cpp @@ -9,6 +9,8 @@ #include "geom-box.hpp" +#include + namespace geom { box_t &box_t::extend(point_t const &point) noexcept diff --git a/src/geom-from-osm.cpp b/src/geom-from-osm.cpp index 71f858f12..3cfd98441 100644 --- a/src/geom-from-osm.cpp +++ b/src/geom-from-osm.cpp @@ -13,6 +13,7 @@ #include #include +#include #include namespace geom { diff --git a/src/geom-functions.hpp b/src/geom-functions.hpp index 51e122ed4..1048a6b8e 100644 --- a/src/geom-functions.hpp +++ b/src/geom-functions.hpp @@ -13,6 +13,8 @@ #include "geom.hpp" #include "reprojection.hpp" +#include +#include #include #include #include diff --git a/src/lua-utils.cpp b/src/lua-utils.cpp index 1a28f346b..ee047f9b5 100644 --- a/src/lua-utils.cpp +++ b/src/lua-utils.cpp @@ -12,7 +12,6 @@ #include "format.hpp" #include -#include // The lua_getextraspace() function is only available from Lua 5.3. For // earlier versions we fall back to storing the context pointer in the diff --git a/src/middle-ram.hpp b/src/middle-ram.hpp index a595104bc..935491012 100644 --- a/src/middle-ram.hpp +++ b/src/middle-ram.hpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/src/node-persistent-cache.cpp b/src/node-persistent-cache.cpp index 6b06b1ceb..7cd97b8c3 100644 --- a/src/node-persistent-cache.cpp +++ b/src/node-persistent-cache.cpp @@ -11,8 +11,9 @@ #include "node-persistent-cache.hpp" #include -#include +#include #include +#include void node_persistent_cache::set(osmid_t id, osmium::Location location) { diff --git a/src/osm2pgsql.cpp b/src/osm2pgsql.cpp index 26bdc47f7..b3178e1e6 100644 --- a/src/osm2pgsql.cpp +++ b/src/osm2pgsql.cpp @@ -16,7 +16,6 @@ #include "output.hpp" #include "pgsql.hpp" #include "pgsql-capabilities.hpp" -#include "pgsql-helper.hpp" #include "properties.hpp" #include "util.hpp" #include "version.hpp" @@ -26,6 +25,7 @@ #include #include #include +#include #include namespace { diff --git a/src/table.cpp b/src/table.cpp index 229e7b160..9d707497f 100644 --- a/src/table.cpp +++ b/src/table.cpp @@ -8,11 +8,9 @@ */ #include -#include #include #include #include -#include #include #include