From 2e0cf63a219d24ef07412deca9b0e6cb02882b46 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 11 Nov 2020 08:27:14 +0100 Subject: Fixing small bugs in cpp03 --- cpp03/ex04/ClapTrap.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cpp03/ex04/ClapTrap.hpp') diff --git a/cpp03/ex04/ClapTrap.hpp b/cpp03/ex04/ClapTrap.hpp index 5f4e26a..8d38307 100644 --- a/cpp03/ex04/ClapTrap.hpp +++ b/cpp03/ex04/ClapTrap.hpp @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/13 15:20:45 by charles #+# #+# */ -/* Updated: 2020/04/13 15:47:14 by charles ### ########.fr */ +/* Updated: 2020/11/11 07:29:18 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,9 +21,9 @@ class ClapTrap { public: ClapTrap(); - ClapTrap(std::string name); + ClapTrap(std::string const& name); ClapTrap(ClapTrap const& other); - void operator=(ClapTrap const& other); + ClapTrap& operator=(ClapTrap const& other); ~ClapTrap(); void rangedAttack(std::string const& target) const; @@ -32,14 +32,12 @@ public: void beRepaired(unsigned int amount); protected: - std::string m_prefix; - unsigned int m_hitPoints; unsigned int m_maxHitPoints; unsigned int m_energyPoints; unsigned int m_maxEnergyPoints; unsigned int m_level; - std::string m_name; + std::string m_name; unsigned int m_meleeAttackDamage; unsigned int m_rangedAttackDamage; unsigned int m_armorDamageReduction; -- cgit