diff --git a/ex01/src/PhoneBook.cpp b/ex01/src/PhoneBook.cpp index ecd93ef..59538ae 100644 --- a/ex01/src/PhoneBook.cpp +++ b/ex01/src/PhoneBook.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/26 00:20:32 by adjoly #+# #+# */ -/* Updated: 2024/11/03 18:50:17 by adjoly ### ########.fr */ +/* Updated: 2024/11/04 10:43:35 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,10 +29,6 @@ PhoneBook::PhoneBook(void) { this->_search(); else if (!input.compare("EXIT")) return ; - else if (input.empty()) - continue ; - else - std::cout << "Not a valid command" << std::endl; } } diff --git a/ex01/src/commands/add.cpp b/ex01/src/commands/add.cpp index de297a2..afd88b1 100644 --- a/ex01/src/commands/add.cpp +++ b/ex01/src/commands/add.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/31 13:51:00 by adjoly #+# #+# */ -/* Updated: 2024/11/03 18:06:18 by adjoly ### ########.fr */ +/* Updated: 2024/11/04 10:43:18 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -47,6 +47,6 @@ void PhoneBook::_add(void) { return ; this->_contact[this->_index].setSecret(input); this->_index++; - if (this->_index >= 8) + if (this->_index > 7) this->_index = 0; }