executeForm changed to const function

This commit is contained in:
aortigos
2026-03-16 10:22:57 +01:00
parent cf1694d630
commit e79a79cf28
4 changed files with 8 additions and 8 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/21 12:12:30 by aortigos #+# #+# */
/* Updated: 2026/03/16 10:07:51 by aortigos ### ########.fr */
/* Updated: 2026/03/16 10:20:39 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -106,7 +106,7 @@ void Bureaucrat::signForm(AForm &form)
}
}
void Bureaucrat::executeForm(AForm &form)
void Bureaucrat::executeForm(const AForm &form) const
{
try {
form.execute(*this);

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/21 12:12:34 by aortigos #+# #+# */
/* Updated: 2026/02/21 12:12:35 by aortigos ### ########.fr */
/* Updated: 2026/03/16 10:17:21 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -39,7 +39,7 @@ class Bureaucrat
void decrementGrade();
void signForm(AForm &form);
void executeForm(AForm &form);
void executeForm(const AForm &form) const;
class GradeTooHighException : public std::exception {
public:

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/21 12:13:44 by aortigos #+# #+# */
/* Updated: 2026/03/16 10:07:59 by aortigos ### ########.fr */
/* Updated: 2026/03/16 10:20:29 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -106,7 +106,7 @@ void Bureaucrat::signForm(AForm &form)
}
}
void Bureaucrat::executeForm(AForm &form)
void Bureaucrat::executeForm(const AForm &form) const
{
try {
form.execute(*this);

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/21 12:13:47 by aortigos #+# #+# */
/* Updated: 2026/02/21 12:13:48 by aortigos ### ########.fr */
/* Updated: 2026/03/16 10:21:45 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -39,7 +39,7 @@ class Bureaucrat
void decrementGrade();
void signForm(AForm &form);
void executeForm(AForm &form);
void executeForm(const AForm &form) const;
class GradeTooHighException : public std::exception {
public: