diff options
Diffstat (limited to 'cpp04/ex02')
| -rw-r--r-- | cpp04/ex02/ISpaceMarine.hpp | 2 | ||||
| -rw-r--r-- | cpp04/ex02/Squad.cpp | 8 | ||||
| -rw-r--r-- | cpp04/ex02/main.cpp | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/cpp04/ex02/ISpaceMarine.hpp b/cpp04/ex02/ISpaceMarine.hpp index ebb5583..b5dde76 100644 --- a/cpp04/ex02/ISpaceMarine.hpp +++ b/cpp04/ex02/ISpaceMarine.hpp @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 15:12:33 by charles #+# #+# */ -/* Updated: 2020/04/14 15:28:26 by charles ### ########.fr */ +/* Updated: 2020/11/17 09:26:59 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/cpp04/ex02/Squad.cpp b/cpp04/ex02/Squad.cpp index 1cc59f0..7ff6906 100644 --- a/cpp04/ex02/Squad.cpp +++ b/cpp04/ex02/Squad.cpp @@ -6,15 +6,17 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 15:08:35 by charles #+# #+# */ -/* Updated: 2020/11/13 12:13:57 by cacharle ### ########.fr */ +/* Updated: 2020/11/17 09:25:58 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "Squad.hpp" -Squad::Squad() : m_units(new ISpaceMarine*[0]), m_size(0) {} +Squad::Squad() + : m_units(new ISpaceMarine*[0]), m_size(0) {} -Squad::Squad(Squad const& other) : m_units(NULL), m_size(0) { *this = other; } +Squad::Squad(Squad const& other) + : m_units(NULL), m_size(0) { *this = other; } Squad& Squad::operator=(Squad const& other) { diff --git a/cpp04/ex02/main.cpp b/cpp04/ex02/main.cpp index c53dadb..ae2c73a 100644 --- a/cpp04/ex02/main.cpp +++ b/cpp04/ex02/main.cpp @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 15:50:35 by charles #+# #+# */ -/* Updated: 2020/11/13 12:36:22 by cacharle ### ########.fr */ +/* Updated: 2020/11/17 09:32:46 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -105,7 +105,7 @@ int main() std::cout << "Origin Count: " << s.getCount() << std::endl; std::cout << "################ ASSIGN" << std::endl; - Squad s3; + Squad s3(s2); s3 = s; std::cout << "Copy Count: " << s3.getCount() << std::endl; s3.push(new TacticalMarine()); |
