aboutsummaryrefslogtreecommitdiff
path: root/cpp03/ex04/ClapTrap.hpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-11-11 08:27:14 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-11-11 08:27:14 +0100
commit2e0cf63a219d24ef07412deca9b0e6cb02882b46 (patch)
tree79d11973ea3c40b8e7cbe0eeefba56dacfbb0583 /cpp03/ex04/ClapTrap.hpp
parentaa40eb5dedd39263ff511de01d6833d24e33b736 (diff)
downloadpiscine_cpp-2e0cf63a219d24ef07412deca9b0e6cb02882b46.tar.gz
piscine_cpp-2e0cf63a219d24ef07412deca9b0e6cb02882b46.tar.bz2
piscine_cpp-2e0cf63a219d24ef07412deca9b0e6cb02882b46.zip
Fixing small bugs in cpp03
Diffstat (limited to 'cpp03/ex04/ClapTrap.hpp')
-rw-r--r--cpp03/ex04/ClapTrap.hpp10
1 files changed, 4 insertions, 6 deletions
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 <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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;