diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-11-12 15:46:07 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-11-12 15:46:07 +0100 |
| commit | b8e39b947890e74d82530e25ad9d02668aae1f0c (patch) | |
| tree | f59acfdecb0711137c200a4c5acb854e351f9cf9 /cpp04/ex01/PlasmaRifle.cpp | |
| parent | 96dcf214a8c40529b251ea31ef037868583dd1da (diff) | |
| download | piscine_cpp-b8e39b947890e74d82530e25ad9d02668aae1f0c.tar.gz piscine_cpp-b8e39b947890e74d82530e25ad9d02668aae1f0c.tar.bz2 piscine_cpp-b8e39b947890e74d82530e25ad9d02668aae1f0c.zip | |
Reformating cpp04 classes
Diffstat (limited to 'cpp04/ex01/PlasmaRifle.cpp')
| -rw-r--r-- | cpp04/ex01/PlasmaRifle.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/cpp04/ex01/PlasmaRifle.cpp b/cpp04/ex01/PlasmaRifle.cpp index 6629905..fc6bddd 100644 --- a/cpp04/ex01/PlasmaRifle.cpp +++ b/cpp04/ex01/PlasmaRifle.cpp @@ -6,30 +6,23 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 13:07:24 by charles #+# #+# */ -/* Updated: 2020/04/14 13:18:53 by charles ### ########.fr */ +/* Updated: 2020/11/12 13:35:36 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "PlasmaRifle.hpp" -PlasmaRifle::PlasmaRifle() - : AWeapon("Plasma Rifle", 5, 21) -{ -} +PlasmaRifle::PlasmaRifle() : AWeapon("Plasma Rifle", 5, 21) {} -PlasmaRifle::PlasmaRifle(PlasmaRifle const& other) -{ - *this = other; -} +PlasmaRifle::PlasmaRifle(PlasmaRifle const& other) : AWeapon(other) {} -void PlasmaRifle::operator=(PlasmaRifle const& other) +PlasmaRifle& PlasmaRifle::operator=(PlasmaRifle const& other) { AWeapon::operator=(other); + return *this; } -PlasmaRifle::~PlasmaRifle() -{ -} +PlasmaRifle::~PlasmaRifle() {} void PlasmaRifle::attack() const { |
