From: Michael Vogt Date: Thu, 24 Oct 2013 06:31:50 +0000 (+0200) Subject: make the main loop a while() instead of a for() as I find this (much) easier to read... X-Git-Tag: 0.9.13.exp1~10 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/a18456a58a9ad2fe33f7fbd202533a115712df96 make the main loop a while() instead of a for() as I find this (much) easier to read this way) --- diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 1a02115ba..56358ae87 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1087,8 +1087,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) dpkgMultiArch = true; } - // this loop is runs once per operation - for (vector::const_iterator I = List.begin(); I != List.end();) + // go over each item + vector::const_iterator I = List.begin(); + while (I != List.end()) { // Do all actions with the same Op in one run vector::const_iterator J = I;