mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Revert "Convert job list to a dequeue"
This reverts commit54050bd4c5
. Type job_list_t was changed from a list to a deque in commit54050bd4c5
. In process_clean_after_marking(), we remove jobs while iterating. dequeues do not support that. Make it a list again.
This commit is contained in:
parent
6f46eaaeeb
commit
121991b98c
2 changed files with 3 additions and 3 deletions
|
@ -591,7 +591,7 @@ void parser_t::job_promote(job_t *job) {
|
|||
assert(loc != my_job_list.end());
|
||||
|
||||
// Move the job to the beginning.
|
||||
std::rotate(my_job_list.begin(), loc, my_job_list.end());
|
||||
my_job_list.splice(my_job_list.begin(), my_job_list, loc);
|
||||
}
|
||||
|
||||
job_t *parser_t::job_get(job_id_t id) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <deque>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
@ -295,7 +295,7 @@ extern bool is_login;
|
|||
extern int is_event;
|
||||
|
||||
// List of jobs. We sometimes mutate this while iterating - hence it must be a list, not a vector
|
||||
typedef std::deque<shared_ptr<job_t>> job_list_t;
|
||||
typedef std::list<shared_ptr<job_t>> job_list_t;
|
||||
|
||||
bool job_list_is_empty(void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue