aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex02/ZombieEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp01/ex02/ZombieEvent.cpp')
-rw-r--r--cpp01/ex02/ZombieEvent.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp01/ex02/ZombieEvent.cpp b/cpp01/ex02/ZombieEvent.cpp
index acb8dd0..44d2c04 100644
--- a/cpp01/ex02/ZombieEvent.cpp
+++ b/cpp01/ex02/ZombieEvent.cpp
@@ -6,15 +6,15 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/13 09:41:33 by charles #+# #+# */
-/* Updated: 2020/04/13 09:49:36 by charles ### ########.fr */
+/* Updated: 2020/11/09 10:25:24 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "ZombieEvent.hpp"
-void ZombieEvent::setZombieType(std::string storedType)
+void ZombieEvent::setZombieType(std::string const& type)
{
- m_storedType = storedType;
+ m_storedType = type;
}
Zombie* ZombieEvent::newZombie(std::string name)
@@ -36,5 +36,5 @@ Zombie* ZombieEvent::randomChump()
"yo",
"rideaux"
};
- return new Zombie(pool[rand() % 10], m_storedType);
+ return newZombie(pool[rand() % 10]);
}