From c9cec718b4c234ee0837657527b525bcbf247bd9 Mon Sep 17 00:00:00 2001 From: Pherring04 <158035107+Pherring04@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:40:04 -0500 Subject: [PATCH] Preserved job queue currant index after pushing a job. (#1781) * Peserved job queue current index after pushing a job. * Reconciled the heinous offense of using tabs. --- .../sim_services/ScheduledJobQueue/ScheduledJobQueue.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trick_source/sim_services/ScheduledJobQueue/ScheduledJobQueue.cpp b/trick_source/sim_services/ScheduledJobQueue/ScheduledJobQueue.cpp index 85824cf8..e604a864 100644 --- a/trick_source/sim_services/ScheduledJobQueue/ScheduledJobQueue.cpp +++ b/trick_source/sim_services/ScheduledJobQueue/ScheduledJobQueue.cpp @@ -91,6 +91,11 @@ int Trick::ScheduledJobQueue::push( JobData * new_job ) { /* Increment the size of the queue */ list_size++ ; + + int new_job_index = (insert_pt - list) / sizeof(JobData**); + if(new_job_index < curr_index) { + curr_index++; + } return(0) ;