diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-11-09 11:26:50 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-11-09 11:26:50 +0100 |
| commit | b799c007a1b6911fcbe5141429ea541e1277ebdd (patch) | |
| tree | d70ad0826ad2fc2d635adf9afecf89af0838d20b /cpp01/ex02/ZombieEvent.cpp | |
| parent | 1e9d90bdf9ef5fc05093d3449d883597c7f896de (diff) | |
| download | piscine_cpp-b799c007a1b6911fcbe5141429ea541e1277ebdd.tar.gz piscine_cpp-b799c007a1b6911fcbe5141429ea541e1277ebdd.tar.bz2 piscine_cpp-b799c007a1b6911fcbe5141429ea541e1277ebdd.zip | |
Fixing some edge cases in cpp00 and cpp01, Updated formatting
Diffstat (limited to 'cpp01/ex02/ZombieEvent.cpp')
| -rw-r--r-- | cpp01/ex02/ZombieEvent.cpp | 8 |
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]); } |
