From 3fd7b092ec6e2fa56603d35768f98b2ceeb9bfcc Mon Sep 17 00:00:00 2001 From: dam Date: Thu, 9 May 2024 23:44:51 +0100 Subject: Added possible solution for active/selected task pointers potential issue. --- ttt.jai | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ttt.jai b/ttt.jai index 01803b2..08d4bbd 100644 --- a/ttt.jai +++ b/ttt.jai @@ -1413,8 +1413,11 @@ main :: () { update_times(*database); //timeout(INPUT_AWAIT_INF); TODO DAM - // TODO WIP Remove `selected_task` and `active_task` and helper functions. - // TODO Every time we add or remove tasks to the database, it may be reallocated, thus making the selected_task and active_task pointers invalid. Check if this is messing up the app. + /* TODO + Remove `selected_task` and `active_task` and helper functions. + Every time we add or remove tasks to the database, it may be reallocated, thus making the selected_task and active_task pointers invalid. Check if this is messing up the app. + Maybe use a macro returns the selected/active task based on the indices. + */ selected_task := get_selected_task(db); active_task := get_active_task(db); selected_task_row: int; -- cgit v1.2.3