mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 05:28:14 +08:00
优化
This commit is contained in:
@@ -28,8 +28,9 @@ bool AddTask(pTimedTask task)
|
|||||||
pTimedTask tmp = task_top;
|
pTimedTask tmp = task_top;
|
||||||
while (tmp)
|
while (tmp)
|
||||||
{
|
{
|
||||||
if ((task->prs_time > tmp->prs_time && task->prs_time <= tmp->next->prs_time)
|
if (tmp->next == NULL
|
||||||
|| tmp->next == NULL)
|
|| (task->prs_time >= tmp->prs_time
|
||||||
|
&& task->prs_time < tmp->next->prs_time))
|
||||||
{
|
{
|
||||||
task->next = tmp->next;
|
task->next = tmp->next;
|
||||||
tmp->next = task;
|
tmp->next = task;
|
||||||
|
|||||||
Reference in New Issue
Block a user