diff --git a/src/parser.cpp b/src/parser.cpp index baecafdac..bd2bff009 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -591,7 +591,7 @@ void parser_t::job_promote(job_t *job) { assert(loc != my_job_list.end()); // Move the job to the beginning. - my_job_list.splice(my_job_list.begin(), my_job_list, loc); + std::rotate(my_job_list.begin(), loc, my_job_list.end()); } job_t *parser_t::job_get(job_id_t id) { diff --git a/src/proc.h b/src/proc.h index e4372d284..aac296af2 100644 --- a/src/proc.h +++ b/src/proc.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -243,7 +243,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::list> job_list_t; +typedef std::deque> job_list_t; bool job_list_is_empty(void);