From 949efda7e1afe3669bc8483a9fc2b1c10b455138 Mon Sep 17 00:00:00 2001 From: Johann Rudloff Date: Thu, 6 Jan 2022 07:52:54 +0100 Subject: [PATCH] Remove redundant copy constructor --- src/Simulation.cpp | 7 ------- src/Simulation.h | 1 - 2 files changed, 8 deletions(-) diff --git a/src/Simulation.cpp b/src/Simulation.cpp index 6d18c03..69c868f 100644 --- a/src/Simulation.cpp +++ b/src/Simulation.cpp @@ -45,13 +45,6 @@ Vec2::Vec2(float x, float y) this->y = y; } -Vec2 Vec2::operator=(const Vec2& v) -{ - x = v.x; - y = v.y; - return (*this); -} - Vec2 Vec2::operator+(const Vec2& v) { Vec2 r; diff --git a/src/Simulation.h b/src/Simulation.h index 4d8a280..c177540 100644 --- a/src/Simulation.h +++ b/src/Simulation.h @@ -35,7 +35,6 @@ public: Vec2(); Vec2(float x, float y); - Vec2 operator=(const Vec2& v); Vec2 operator+(const Vec2& v); Vec2 operator-(const Vec2& v); Vec2 operator*(float c); -- 2.34.2