diff options
author | Lars Henriksen <LarsHenriksen@get2net.dk> | 2021-01-20 23:47:42 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2021-01-31 09:55:44 -0500 |
commit | 4777c60056e42d985cff4e48beb06cdb4cd9b83f (patch) | |
tree | 47ff071996c7bcfe341972e0e0a86b7ce78d70d2 /src | |
parent | b44307cc83c730618bec85e91bab490d11f8dc64 (diff) | |
download | calcurse-4777c60056e42d985cff4e48beb06cdb4cd9b83f.tar.gz calcurse-4777c60056e42d985cff4e48beb06cdb4cd9b83f.zip |
Todo resort() optimization
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/todo.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -158,9 +158,7 @@ void todo_delete(struct todo *todo) */ void todo_resort(struct todo *t) { - llist_item_t *i = LLIST_FIND_FIRST(&todolist, t, NULL); - LLIST_REMOVE(&todolist, i); - LLIST_ADD_SORTED(&todolist, t, todo_cmp); + LLIST_REORDER(&todolist, t, todo_cmp); } /* Flag a todo item. */ |