diff --git a/src/parser.cpp b/src/parser.cpp index 8480ecd0b..dfa69f5dc 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. - 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) { diff --git a/src/proc.h b/src/proc.h index d1de80641..645e40ed5 100644 --- a/src/proc.h +++ b/src/proc.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -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> job_list_t; +typedef std::list> job_list_t; bool job_list_is_empty(void);