executeForm changed to const function
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user