summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-11 20:53:07 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:18 +0200
commitae732225ec2fa0d7434c9f40a92ced8683752211 (patch)
treebac1ff4ba6bdc42f342446c86966f9dad350c3b4 /apt-pkg/acquire-worker.cc
parentfcffe89d8344e699267210badac53ff24dd41148 (diff)
use std-algorithms instead of manual loops to avoid overflow warning
Reported-By: gcc Understandable: no Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc4
1 files changed, 2 insertions, 2 deletions
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<Item*> const ItmOwners = Itm->Owners;