[Tile-serving] [openstreetmap/osm2pgsql] Use default member initialization in some classes. (#971)
Sarah Hoffmann
notifications at github.com
Thu Nov 14 20:35:00 UTC 2019
lonvia commented on this pull request.
> std::shared_ptr<reprojection> projection; ///< SRS of projection
- bool append; ///< Append to existing data
- bool slim; ///< In slim mode
- int cache; ///< Memory usable for cache in MB
- boost::optional<std::string> tblsmain_index; ///< Pg Tablespace to store indexes on main tables (no default TABLESPACE)
- boost::optional<std::string> tblsslim_index; ///< Pg Tablespace to store indexes on slim tables (no default TABLESPACE)
- boost::optional<std::string> tblsmain_data; ///< Pg Tablespace to store main tables (no default TABLESPACE)
- boost::optional<std::string> tblsslim_data; ///< Pg Tablespace to store slim tables (no default TABLESPACE)
- std::string style; ///< style file to use
+ bool append = false; ///< Append to existing data
+ bool slim = false; ///< In slim mode
+ int cache = 800; ///< Memory usable for cache in MB
+ boost::optional<std::string> tblsmain_index{boost::none}; ///< Pg Tablespace to store indexes on main tables (no default TABLESPACE)
+ boost::optional<std::string> tblsslim_index{boost::none}; ///< Pg Tablespace to store indexes on slim tables (no default TABLESPACE)
+ boost::optional<std::string> tblsmain_data{boost::none}; ///< Pg Tablespace to store main tables (no default TABLESPACE)
+ boost::optional<std::string> tblsslim_data{boost::none}; ///< Pg Tablespace to store slim tables (no default TABLESPACE)
Please also adhere to the 80 column limit while you are changing stuff here (i.e. move comments above the members).
> @@ -278,30 +278,14 @@ std::string database_options_t::conninfo() const
}
options_t::options_t()
-: prefix("planet_osm"),
- projection(reprojection::create_projection(PROJ_SPHERE_MERC)), append(false),
- slim(false), cache(800), tblsmain_index(boost::none),
- tblsslim_index(boost::none), tblsmain_data(boost::none),
- tblsslim_data(boost::none), style(DEFAULT_STYLE),
- expire_tiles_zoom(0), expire_tiles_zoom_min(0),
- expire_tiles_max_bbox(20000.0), expire_tiles_filename("dirty_tiles"),
- hstore_mode(HSTORE_NONE), enable_hstore_index(false), enable_multi(false),
- hstore_columns(), keep_coastlines(false), parallel_indexing(true),
+: projection(reprojection::create_projection(PROJ_SPHERE_MERC)),
#ifdef __amd64__
alloc_chunkwise(ALLOC_SPARSE | ALLOC_DENSE),
#else
alloc_chunkwise(ALLOC_SPARSE),
#endif
Want to get rid of the #ifdef in the middle of the constructor as well?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/971#pullrequestreview-317240655
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20191114/c402279d/attachment.html>
More information about the Tile-serving
mailing list