From 478a7acb2b9bd63cd0e09c56606d665c610fa14f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 25 Feb 2013 19:33:35 -0500 Subject: [PATCH] c++ style --- include/mapnik/map.hpp | 14 +++++++------- src/map.cpp | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index 2be6bf3d1..fcf121832 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -112,14 +112,14 @@ public: * * @param rhs Map to copy from. */ - Map(const Map& rhs); + Map(Map const& rhs); /*! \brief Assignment operator * * TODO: to be documented * */ - Map& operator=(const Map& rhs); + Map& operator=(Map const& rhs); /*! \brief Get all styles * @return Const reference to styles @@ -201,13 +201,13 @@ public: /*! \brief Add a layer to the map. * @param l The layer to add. */ - void addLayer(const layer& l); + void addLayer(layer const& l); /*! \brief Get a layer. * @param index layer number. * @return Constant layer. */ - const layer& getLayer(size_t index) const; + layer const& getLayer(size_t index) const; /*! \brief Get a layer. * @param index layer number. @@ -267,7 +267,7 @@ public: /*! \brief Set the map background color. * @param c Background color. */ - void set_background(const color& c); + void set_background(color const& c); /*! \brief Get the map background color * @return Background color as boost::optional @@ -327,7 +327,7 @@ public: * Aspect is handled automatic if not fitting to width/height. * @param box The bounding box where to zoom. */ - void zoom_to_box(const box2d& box); + void zoom_to_box(box2d const& box); /*! \brief Zoom the map to show all data. */ @@ -340,7 +340,7 @@ public: /*! \brief Get current bounding box. * @return The current bounding box. */ - const box2d& get_current_extent() const; + box2d const& get_current_extent() const; /*! \brief Get current buffered bounding box. * @return The current buffered bounding box. diff --git a/src/map.cpp b/src/map.cpp index a051b32ee..ca29e3a15 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -75,7 +75,7 @@ Map::Map(int width,int height, std::string const& srs) aspectFixMode_(GROW_BBOX), base_path_("") {} -Map::Map(const Map& rhs) +Map::Map(Map const& rhs) : width_(rhs.width_), height_(rhs.height_), srs_(rhs.srs_), @@ -93,7 +93,7 @@ Map::Map(const Map& rhs) Map::~Map() {} -Map& Map::operator=(const Map& rhs) +Map& Map::operator=(Map const& rhs) { if (this==&rhs) return *this; width_=rhs.width_; @@ -132,12 +132,12 @@ Map::style_iterator Map::end_styles() return styles_.end(); } -Map::const_style_iterator Map::begin_styles() const +Map::const_style_iterator Map::begin_styles() const { return styles_.begin(); } -Map::const_style_iterator Map::end_styles() const +Map::const_style_iterator Map::end_styles() const { return styles_.end(); } @@ -194,7 +194,7 @@ size_t Map::layer_count() const return layers_.size(); } -void Map::addLayer(const layer& l) +void Map::addLayer(layer const& l) { layers_.push_back(l); } @@ -210,7 +210,7 @@ void Map::remove_all() styles_.clear(); } -const layer& Map::getLayer(size_t index) const +layer const& Map::getLayer(size_t index) const { return layers_[index]; } @@ -302,7 +302,7 @@ boost::optional const& Map::background() const return background_; } -void Map::set_background(const color& c) +void Map::set_background(color const& c) { background_ = c; } @@ -426,7 +426,7 @@ void Map::zoom_all() } } -void Map::zoom_to_box(const box2d &box) +void Map::zoom_to_box(box2d const& box) { current_extent_=box; fixAspectRatio(); @@ -488,7 +488,7 @@ void Map::fixAspectRatio() } } -const box2d& Map::get_current_extent() const +box2d const& Map::get_current_extent() const { return current_extent_; }