diff options
author | ache <ache@ache.one> | 2017-01-10 01:23:30 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2017-01-10 01:23:30 +0100 |
commit | 8f56a469d9384e255c0c65103e30a1ffa8cdc062 (patch) | |
tree | eb3d33c09ee1a58a0dcf44127031d33b53e58b06 | |
parent | Fix clean option to deal with new states (diff) |
Doublon not avalible anymore
-rwxr-xr-x | todo.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -154,8 +154,14 @@ int main(int argc, char *argv[]) { if( sargv == "" ) { cout << "Chaine vide" << endl; break; - } else + } else { + for ( int i = listTodo.size()-1; i >= 0 ; --i) + if( listTodo.at(i).str == sargv ) { + cerr << "Erreur doublon" << endl; + break; + } listTodo.push_back(todoFromCmd(sargv)); + } break; } |