fix(commands/cmd): now using NULL instead nullptr

This commit is contained in:
Raphael 2025-05-26 17:55:31 +02:00
parent bcfa001d5e
commit 29a3bb114b
7 changed files with 67 additions and 41 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/24 17:34:30 by rparodi #+# #+# */
/* Updated: 2025/05/24 18:23:26 by rparodi ### ########.fr */
/* Updated: 2025/05/26 16:14:24 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,7 +18,7 @@
* @tparam T Type of the list have to be search (have to get an getName() method)
* @param list list to search in
* @param name name of the element to search
* @return pointer to the element found or nullptr if not found
* @return pointer to the element found or NULL if not found
*/
template <typename T>
T cmd::searchList(const std::list<T> &list, const std::string &name) {
@ -26,5 +26,5 @@ T cmd::searchList(const std::list<T> &list, const std::string &name) {
if ((*it)->getName() == name)
return *it;
}
return nullptr;
return NULL;
}

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/24 17:17:31 by rparodi #+# #+# */
/* Updated: 2025/05/24 17:32:43 by rparodi ### ########.fr */
/* Updated: 2025/05/26 16:27:42 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,6 +16,6 @@
class cmd::Invite : public ACommand {
public:
virtual void execute(Server &server, User &client, const std::vector<std::string> &args);
virtual void execute(void);
virtual bool checkArgs();
};