diff --git a/src/expire-config.hpp b/src/expire-config.hpp index f2113fc2b..f0194eb89 100644 --- a/src/expire-config.hpp +++ b/src/expire-config.hpp @@ -10,9 +10,10 @@ * For a full list of authors see the git log. */ +#include #include -enum class expire_mode +enum class expire_mode : uint8_t { full_area, // Expire all tiles covered by polygon. boundary_only, // Expire only tiles covered by polygon boundary. diff --git a/src/flex-table.hpp b/src/flex-table.hpp index f45b0057c..8332b0342 100644 --- a/src/flex-table.hpp +++ b/src/flex-table.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,7 @@ * output. This is not a real primary key, because the values are not * necessarily unique. */ -enum class flex_table_index_type { +enum class flex_table_index_type : uint8_t { no_index, node, // index by node id way, // index by way id @@ -57,7 +58,7 @@ class flex_table_t * Table creation type: interim tables are created as UNLOGGED and with * autovacuum disabled. */ - enum class table_type { + enum class table_type : uint8_t { interim, permanent }; diff --git a/src/input.cpp b/src/input.cpp index f23731034..96fb1d458 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -122,9 +122,9 @@ class data_source_t using iterator = osmium::memory::Buffer::t_iterator; std::unique_ptr m_reader; - osmium::memory::Buffer m_buffer{}; - iterator m_it{}; - iterator m_end{}; + osmium::memory::Buffer m_buffer; + iterator m_it; + iterator m_end; type_id m_last = {osmium::item_type::node, 0}; }; // class data_source_t diff --git a/src/input.hpp b/src/input.hpp index 37b841596..00a73e46a 100644 --- a/src/input.hpp +++ b/src/input.hpp @@ -35,8 +35,8 @@ struct type_id struct file_info { - osmium::io::Header header{}; - osmium::Timestamp last_timestamp{}; + osmium::io::Header header; + osmium::Timestamp last_timestamp; }; /** diff --git a/src/logging.hpp b/src/logging.hpp index 04748b1f5..4504276f3 100644 --- a/src/logging.hpp +++ b/src/logging.hpp @@ -18,10 +18,11 @@ #include #include +#include #include #include -enum class log_level +enum class log_level : uint8_t { debug = 1, info = 2, diff --git a/src/middle.cpp b/src/middle.cpp index e2b930f8c..5158c76af 100644 --- a/src/middle.cpp +++ b/src/middle.cpp @@ -12,6 +12,10 @@ #include "middle.hpp" #include "options.hpp" +middle_query_t::~middle_query_t() = default; + +middle_t::~middle_t() = default; + std::shared_ptr create_middle(std::shared_ptr thread_pool, options_t const &options) diff --git a/src/middle.hpp b/src/middle.hpp index 2edacfe5c..4b3499735 100644 --- a/src/middle.hpp +++ b/src/middle.hpp @@ -13,6 +13,7 @@ #include #include +#include #include #include "osmtypes.hpp" @@ -89,8 +90,6 @@ struct middle_query_t : std::enable_shared_from_this osmium::memory::Buffer *buffer) const = 0; }; -inline middle_query_t::~middle_query_t() = default; - /** * Interface for storing "raw" OSM data in an intermediate object store and * getting it back. @@ -173,7 +172,7 @@ class middle_t } #ifndef NDEBUG - enum class middle_state + enum class middle_state : uint8_t { constructed, started, @@ -191,8 +190,6 @@ class middle_t std::shared_ptr m_thread_pool; }; // class middle_t -inline middle_t::~middle_t() = default; - /// Factory function: Instantiate the middle based on the command line options. std::shared_ptr create_middle(std::shared_ptr thread_pool, diff --git a/src/options.hpp b/src/options.hpp index 80ee36a31..4fdbed059 100644 --- a/src/options.hpp +++ b/src/options.hpp @@ -21,7 +21,7 @@ class reprojection; -enum class command_t +enum class command_t : uint8_t { help, version, @@ -53,30 +53,30 @@ struct options_t bool prefix_is_set = false; /// Pg Tablespace to store indexes on main tables (no default TABLESPACE) - std::string tblsmain_index{}; + std::string tblsmain_index; /// Pg Tablespace to store indexes on slim tables (no default TABLESPACE) - std::string tblsslim_index{}; + std::string tblsslim_index; /// Pg Tablespace to store main tables (no default TABLESPACE) - std::string tblsmain_data{}; + std::string tblsmain_data; /// Pg Tablespace to store slim tables (no default TABLESPACE) - std::string tblsslim_data{}; + std::string tblsslim_data; /// Default Pg schema. std::string dbschema{"public"}; /// Pg schema to store middle tables in. - std::string middle_dbschema{}; + std::string middle_dbschema; /// Pg schema to store output tables in. - std::string output_dbschema{}; + std::string output_dbschema; - std::string style{}; ///< style file to use + std::string style; ///< style file to use /// Name of the flat node file used. Empty if flat node file is not enabled. - std::string flat_node_file{}; + std::string flat_node_file; std::string tag_transform_script; diff --git a/src/output-flex.hpp b/src/output-flex.hpp index 48fbb560a..9a4ad92ff 100644 --- a/src/output-flex.hpp +++ b/src/output-flex.hpp @@ -298,19 +298,19 @@ class output_flex_t : public output_t osmium::memory::Buffer m_area_buffer; - prepared_lua_function_t m_process_node{}; - prepared_lua_function_t m_process_way{}; - prepared_lua_function_t m_process_relation{}; + prepared_lua_function_t m_process_node; + prepared_lua_function_t m_process_way; + prepared_lua_function_t m_process_relation; - prepared_lua_function_t m_process_untagged_node{}; - prepared_lua_function_t m_process_untagged_way{}; - prepared_lua_function_t m_process_untagged_relation{}; + prepared_lua_function_t m_process_untagged_node; + prepared_lua_function_t m_process_untagged_way; + prepared_lua_function_t m_process_untagged_relation; - prepared_lua_function_t m_select_relation_members{}; + prepared_lua_function_t m_select_relation_members; - prepared_lua_function_t m_after_nodes{}; - prepared_lua_function_t m_after_ways{}; - prepared_lua_function_t m_after_relations{}; + prepared_lua_function_t m_after_nodes; + prepared_lua_function_t m_after_ways; + prepared_lua_function_t m_after_relations; calling_context m_calling_context = calling_context::main; diff --git a/src/properties.cpp b/src/properties.cpp index 563e5029e..0f41995e7 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -83,7 +83,8 @@ bool properties_t::get_bool(std::string const &property, property); } -void properties_t::set_string(std::string property, std::string value) +void properties_t::set_string(std::string const &property, + std::string const &value) { m_properties[property] = value; m_to_update[property] = value; diff --git a/src/properties.hpp b/src/properties.hpp index 74f907553..ac27e9a3a 100644 --- a/src/properties.hpp +++ b/src/properties.hpp @@ -54,7 +54,7 @@ class properties_t * \param property Name of the property * \param value Value of the property */ - void set_string(std::string property, std::string value); + void set_string(std::string const &property, std::string const &value); /** * Set property to integer value. The integer will be converted to a string diff --git a/src/thread-pool.hpp b/src/thread-pool.hpp index e61b9a7b4..4680abbfa 100644 --- a/src/thread-pool.hpp +++ b/src/thread-pool.hpp @@ -60,7 +60,7 @@ class task_result_t std::chrono::microseconds runtime() const noexcept { return m_result; } private: - std::future m_future{}; + std::future m_future; std::chrono::microseconds m_result{}; }; // class task_result_t