From bdbaf947f7b26d6ec4478d98beb49844d3bbce13 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 4 Mar 2015 09:19:53 +0100 Subject: [PATCH] default assignment op + cleanups --- include/mapnik/geometry_impl.hpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/include/mapnik/geometry_impl.hpp b/include/mapnik/geometry_impl.hpp index e78223d99..cc8a30f33 100644 --- a/include/mapnik/geometry_impl.hpp +++ b/include/mapnik/geometry_impl.hpp @@ -41,22 +41,12 @@ struct point { point() {} point(double x_, double y_) - : x(x_),y(y_) {} - - point(point const& other) - : x(other.x), - y(other.y) {} + : x(x_), y(y_) + {} + point(point const& other) = default; point(point && other) noexcept = default; - - point & operator=(point const& other) - { - if (this == &other) return *this; - point tmp(other); - std::swap(x, tmp.x); - std::swap(y, tmp.y); - return *this; - } + point & operator=(point const& other) = default; double x; double y; };