This is not ideal. These due times should be treated as variables - everytime defined; with the queue there is a chance they can be not present in queue, or put into queue multiple times.
Also sorting entire structure is a bit overkill - I just need to find the oldest. No sense to re-sort structure of 15 pairs everytime "scheduler" runs. (Not that would do much harm to CPU) Dumb pairs seems the best to me. I will at least save one set of variables (all these *_check_due variables) -- https://code.launchpad.net/~widelands-dev/widelands/ai-scheduler/+merge/251327 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/ai-scheduler into lp:widelands. _______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp