From ad18c6ce0ab2452d64df36a199c740a926ceb939 Mon Sep 17 00:00:00 2001 From: Zach Bjornson Date: Sat, 29 Oct 2022 18:24:19 -0700 Subject: [PATCH] src: shorten copy assignment operator decl for Point --- src/Point.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Point.h b/src/Point.h index a797dc46c..a61f8b1ba 100644 --- a/src/Point.h +++ b/src/Point.h @@ -1,17 +1,11 @@ // Copyright (c) 2010 LearnBoost #pragma once -#include - template class Point { public: T x, y; Point(T x=0, T y=0): x(x), y(y) {} Point(const Point&) = default; - Point& operator=(Point other) { - std::swap(x, other.x); - std::swap(y, other.y); - return *this; - } + Point& operator=(const Point&) = default; };