diff --git a/include/mapnik/group/group_layout_manager.hpp b/include/mapnik/group/group_layout_manager.hpp index 3db329df8..b44921b93 100644 --- a/include/mapnik/group/group_layout_manager.hpp +++ b/include/mapnik/group/group_layout_manager.hpp @@ -40,7 +40,7 @@ using bound_box = box2d; struct group_layout_manager { - group_layout_manager(const group_layout &layout) + group_layout_manager(group_layout const& layout) : layout_(layout), input_origin_(0, 0), member_boxes_(vector()), @@ -49,7 +49,7 @@ struct group_layout_manager { } - group_layout_manager(const group_layout &layout, const pixel_position &input_origin) + group_layout_manager(group_layout const& layout, pixel_position const& input_origin) : layout_(layout), input_origin_(input_origin), member_boxes_(vector()), @@ -58,8 +58,8 @@ struct group_layout_manager { } - group_layout_manager(const group_layout &layout, const pixel_position &input_origin, - const vector &item_boxes) + group_layout_manager(group_layout const& layout, pixel_position const& input_origin, + vector const& item_boxes) : layout_(layout), input_origin_(input_origin), member_boxes_(item_boxes), @@ -68,19 +68,19 @@ struct group_layout_manager { } - inline void set_layout(const group_layout &layout) + inline void set_layout(group_layout const& layout) { layout_ = layout; update_layout_ = true; } - inline void add_member_bound_box(const bound_box &member_box) + inline void add_member_bound_box(bound_box const& member_box) { member_boxes_.push_back(member_box); update_layout_ = true; } - inline const pixel_position &offset_at(size_t i) + inline pixel_position const& offset_at(size_t i) { handle_update(); return member_offsets_.at(i); diff --git a/src/group/group_layout_manager.cpp b/src/group/group_layout_manager.cpp index 6090d734f..7799d5fda 100644 --- a/src/group/group_layout_manager.cpp +++ b/src/group/group_layout_manager.cpp @@ -44,9 +44,9 @@ struct process_layout : public util::static_visitor<> // and the offset values should position them around (0,0) pixel_position const& input_origin_; - process_layout(const vector &member_bboxes, + process_layout(vector const& member_bboxes, vector &member_offsets, - const pixel_position &input_origin) + pixel_position const& input_origin) : member_boxes_(member_bboxes), member_offsets_(member_offsets), input_origin_(input_origin) @@ -140,7 +140,7 @@ private: // stores corresponding offset, and returns modified bounding box bound_box box_offset_align(size_t i, double x, double y, int x_dir, int y_dir) const { - const bound_box &box = member_boxes_[i]; + bound_box const& box = member_boxes_[i]; pixel_position offset((x_dir == 0 ? x - input_origin_.x : x - (x_dir < 0 ? box.maxx() : box.minx())), (y_dir == 0 ? y - input_origin_.y : y - (y_dir < 0 ? box.maxy() : box.miny()))); @@ -152,8 +152,8 @@ private: bound_box group_layout_manager::offset_box_at(size_t i) { handle_update(); - const pixel_position &offset = member_offsets_.at(i); - const bound_box &box = member_boxes_.at(i); + pixel_position const& offset = member_offsets_.at(i); + bound_box const& box = member_boxes_.at(i); return box2d(box.minx() + offset.x, box.miny() + offset.y, box.maxx() + offset.x, box.maxy() + offset.y); }