aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex05
diff options
context:
space:
mode:
Diffstat (limited to 'cpp01/ex05')
-rw-r--r--cpp01/ex05/Human.cpp11
-rw-r--r--cpp01/ex05/Human.hpp6
-rw-r--r--cpp01/ex05/main.cpp6
3 files changed, 10 insertions, 13 deletions
diff --git a/cpp01/ex05/Human.cpp b/cpp01/ex05/Human.cpp
index f4c0066..e7f55bd 100644
--- a/cpp01/ex05/Human.cpp
+++ b/cpp01/ex05/Human.cpp
@@ -6,23 +6,20 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:52:38 by cacharle #+# #+# */
-/* Updated: 2020/04/13 10:09:03 by charles ### ########.fr */
+/* Updated: 2020/11/09 11:04:09 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "Human.hpp"
-Human::Human()
- : m_brain()
-{
-}
+Human::Human() : m_brain() {}
-std::string Human::identify()
+std::string Human::identify() const
{
return m_brain.identify();
}
-const Brain& Human::getBrain()
+const Brain& Human::getBrain() const
{
return m_brain;
}
diff --git a/cpp01/ex05/Human.hpp b/cpp01/ex05/Human.hpp
index d7a4611..fc89d03 100644
--- a/cpp01/ex05/Human.hpp
+++ b/cpp01/ex05/Human.hpp
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:52:39 by cacharle #+# #+# */
-/* Updated: 2020/04/13 10:08:07 by charles ### ########.fr */
+/* Updated: 2020/11/09 11:03:44 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,8 +19,8 @@ class Human
{
public:
Human();
- std::string identify();
- const Brain& getBrain() ;
+ std::string identify() const;
+ const Brain& getBrain() const;
private:
const Brain m_brain;
diff --git a/cpp01/ex05/main.cpp b/cpp01/ex05/main.cpp
index 584320a..8ad1493 100644
--- a/cpp01/ex05/main.cpp
+++ b/cpp01/ex05/main.cpp
@@ -6,12 +6,12 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:57:25 by cacharle #+# #+# */
-/* Updated: 2020/02/02 16:27:47 by cacharle ### ########.fr */
+/* Updated: 2020/11/09 10:59:52 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
-# include "Brain.hpp"
-# include "Human.hpp"
+#include "Brain.hpp"
+#include "Human.hpp"
int main()
{