fix(commands/cmd): fixing the compilation errors missing the lists part

This commit is contained in:
Raphael 2025-05-26 18:26:59 +02:00
parent 29a3bb114b
commit a2b5793e19
9 changed files with 27 additions and 74 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/26 16:14:24 by rparodi ### ########.fr */
/* Updated: 2025/05/26 18:20:34 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,7 +22,7 @@
*/
template <typename T>
T cmd::searchList(const std::list<T> &list, const std::string &name) {
for (typename std::list<T>::iterator it = list.begin(); it != list.end(); ++it) {
for (typename std::list<T>::const_iterator it = list.begin(); it != list.end(); ++it) {
if ((*it)->getName() == name)
return *it;
}