diff options
author | ache <ache@ache.one> | 2017-09-19 13:54:47 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2017-09-19 13:54:47 +0200 |
commit | 901f2aca813443ecf0d43694aaf6244989587c84 (patch) | |
tree | 5a079ebb24617f67f00c7ff75e49f30e2afb6ebc /todo.cpp | |
parent | Ajout d'un espace si celui-ci manque (diff) |
Meilleur vérification des doublons
Diffstat (limited to 'todo.cpp')
-rwxr-xr-x | todo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -222,13 +222,14 @@ int main(int argc, char *argv[]) { cout << "Chaine vide" << endl; break; } else { + todo tmpTodo = todoFromCmd(sargv); for ( int i = listTodo.size()-1; i >= 0 ; --i) - if( listTodo.at(i).str == sargv ) { + if( listTodo.at(i).str == tmpTodo.str ) { cerr << "Erreur doublon" << endl; exit(-1); break; } - listTodo.push_back(todoFromCmd(sargv)); + listTodo.push_back(tmpTodo); } break; |