Просмотр исходного кода

make the main loop a while() instead of a for() as I find this (much) easier to read this way)

Michael Vogt лет назад: 12
Родитель
Сommit
a18456a58a
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      apt-pkg/deb/dpkgpm.cc

+ 3 - 2
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<Item>::const_iterator I = List.begin(); I != List.end();)
+   // go over each item
+   vector<Item>::const_iterator I = List.begin();
+   while (I != List.end())
    {
       // Do all actions with the same Op in one run
       vector<Item>::const_iterator J = I;