From b8e39b947890e74d82530e25ad9d02668aae1f0c Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 12 Nov 2020 15:46:07 +0100 Subject: Reformating cpp04 classes --- cpp04/ex01/PowerFist.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'cpp04/ex01/PowerFist.cpp') diff --git a/cpp04/ex01/PowerFist.cpp b/cpp04/ex01/PowerFist.cpp index d14deba..2ae0337 100644 --- a/cpp04/ex01/PowerFist.cpp +++ b/cpp04/ex01/PowerFist.cpp @@ -6,30 +6,23 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 13:15:42 by charles #+# #+# */ -/* Updated: 2020/04/14 14:09:51 by charles ### ########.fr */ +/* Updated: 2020/11/12 13:40:53 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "PowerFist.hpp" -PowerFist::PowerFist() - : AWeapon("Power Fist", 8, 50) -{ -} +PowerFist::PowerFist() : AWeapon("Power Fist", 8, 50) {} -PowerFist::PowerFist(PowerFist const& other) -{ - *this = other; -} +PowerFist::PowerFist(PowerFist const& other) : AWeapon(other) {} -void PowerFist::operator=(PowerFist const& other) +PowerFist& PowerFist::operator=(PowerFist const& other) { AWeapon::operator=(other); + return *this; } -PowerFist::~PowerFist() -{ -} +PowerFist::~PowerFist() {} void PowerFist::attack() const { -- cgit