Skip to content

Commit e834bee

Browse files
committed
qmanager: erase_pending_job now takes regular ptr
Problem: the updated erase_pending_job method takes a regular pointer and not a shared_ptr (as before). Solution: use job.get() to provide the right type! Signed-off-by: vsoch <[email protected]>
1 parent de2908f commit e834bee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

qmanager/policies/base/queue_policy_base.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ class queue_policy_base_t : public resource_model::queue_adapter_base_t
448448
job = m_jobs[id];
449449
switch (job->state) {
450450
case job_state_kind_t::PENDING:
451-
this->remove_pending(job.get());
451+
this->remove_pending(job.get ());
452452
break;
453453
case job_state_kind_t::ALLOC_RUNNING:
454454
m_alloced.erase (job->t_stamps.running_ts);
@@ -737,7 +737,7 @@ class queue_policy_base_t : public resource_model::queue_adapter_base_t
737737
}
738738
} else {
739739
bool found_in_prov = false;
740-
if (erase_pending_job (job, found_in_prov) < 0)
740+
if (erase_pending_job (job.get (), found_in_prov) < 0)
741741
return -1;
742742
job->priority = priority;
743743
if (insert_pending_job (job, found_in_prov) < 0)
@@ -806,7 +806,7 @@ class queue_policy_base_t : public resource_model::queue_adapter_base_t
806806
auto job = m_jobs[id];
807807
if (job->state == job_state_kind_t::PENDING) {
808808
bool found_in_provisional = false;
809-
if (erase_pending_job (job, found_in_provisional) < 0)
809+
if (erase_pending_job (job.get (), found_in_provisional) < 0)
810810
return -1;
811811
job->state = job_state_kind_t::CANCELED;
812812
auto res = m_canceled.insert (
@@ -836,7 +836,7 @@ class queue_policy_base_t : public resource_model::queue_adapter_base_t
836836
auto job = m_jobs[id];
837837
if (job->state == job_state_kind_t::PENDING) {
838838
bool found_in_provisional = false;
839-
if (erase_pending_job (job, found_in_provisional) < 0)
839+
if (erase_pending_job (job.get (), found_in_provisional) < 0)
840840
return -1;
841841
job->priority = priority;
842842
if (insert_pending_job (job, found_in_provisional) < 0)
@@ -1053,4 +1053,4 @@ class queue_policy_base_t : public resource_model::queue_adapter_base_t
10531053

10541054
/*
10551055
* vi:tabstop=4 shiftwidth=4 expandtab
1056-
*/
1056+
*/

0 commit comments

Comments
 (0)