From ae732225ec2fa0d7434c9f40a92ced8683752211 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Sep 2015 20:53:07 +0200 Subject: use std-algorithms instead of manual loops to avoid overflow warning Reported-By: gcc Understandable: no Git-Dch: Ignore --- apt-pkg/acquire-worker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/acquire-worker.cc') diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 889768030..45ee6dde3 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -254,8 +254,8 @@ bool pkgAcquire::Worker::RunMessages() ItemDone(); // Change the status so that it can be dequeued - for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O) - (*O)->Status = pkgAcquire::Item::StatIdle; + for (auto const &O: Itm->Owners) + O->Status = pkgAcquire::Item::StatIdle; // Mark the item as done (taking care of all queues) // and then put it in the main queue again std::vector const ItmOwners = Itm->Owners; -- cgit v1.2.3