aboutsummaryrefslogtreecommitdiff
path: root/cpp05/ex03/Intern.cpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-12-12 12:33:39 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-12-12 12:33:39 +0100
commit0071b1e944cbce91ff6ff8e235280c3955ce1d5b (patch)
treeaf908c41fc051002311f50e8f73b889769a5279e /cpp05/ex03/Intern.cpp
parentc10aa969c60cedef893146307fa319250901465a (diff)
downloadpiscine_cpp-0071b1e944cbce91ff6ff8e235280c3955ce1d5b.tar.gz
piscine_cpp-0071b1e944cbce91ff6ff8e235280c3955ce1d5b.tar.bz2
piscine_cpp-0071b1e944cbce91ff6ff8e235280c3955ce1d5b.zip
Fixing cpp05 small errors
Diffstat (limited to 'cpp05/ex03/Intern.cpp')
-rw-r--r--cpp05/ex03/Intern.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp05/ex03/Intern.cpp b/cpp05/ex03/Intern.cpp
index 3328957..b31c2b3 100644
--- a/cpp05/ex03/Intern.cpp
+++ b/cpp05/ex03/Intern.cpp
@@ -6,7 +6,7 @@
/* By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/17 13:41:09 by cacharle #+# #+# */
-/* Updated: 2020/11/17 18:08:56 by charles ### ########.fr */
+/* Updated: 2020/12/12 12:32:15 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -37,6 +37,11 @@ Form *Intern::makeForm(std::string const& name, std::string const& target)
{
for (size_t i = 0; i < sizeof(Intern::makeFormDispatch) / sizeof(Intern::makeFormEntry); i++)
if ((this->makeFormDispatch[i]).name == name)
- return (this->*(makeFormDispatch[i].func))(target);
+ {
+ Form *form = (this->*(makeFormDispatch[i].func))(target);
+ std::cout << "Intern creates " << *form;
+ return form;
+ }
+ std::cout << "Intern cannot create form: " << name << " is not a known form name" << std::endl;
return NULL;
}