From b799c007a1b6911fcbe5141429ea541e1277ebdd Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 9 Nov 2020 11:26:50 +0100 Subject: Fixing some edge cases in cpp00 and cpp01, Updated formatting --- cpp01/ex02/ZombieEvent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp01/ex02/ZombieEvent.cpp') 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 +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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]); } -- cgit