From 8621f2480faece77ded916eb4f46c6fcbf6693d5 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Fri, 17 Jun 2016 02:01:56 +0000 Subject: [PATCH] [GL] Shorten code by using default copy assignment --- GeoLib/LineSegment.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/GeoLib/LineSegment.cpp b/GeoLib/LineSegment.cpp index e0d3adbd2d8..17269b73201 100644 --- a/GeoLib/LineSegment.cpp +++ b/GeoLib/LineSegment.cpp @@ -44,15 +44,7 @@ LineSegment::~LineSegment() } } -LineSegment& LineSegment::operator=(LineSegment const& other) -{ - _a = other._a; - _b = other._b; - _point_mem_management_by_line_segment = - other._point_mem_management_by_line_segment; - - return *this; -} +LineSegment& LineSegment::operator=(LineSegment const& other) = default; LineSegment& LineSegment::operator=(LineSegment&& line_segment) { -- GitLab