cppcheck complains about some possible speed improvements which could be
[ntk/apt.git] / apt-pkg / deb / debrecords.cc
index 5b8538a..7f596ab 100644 (file)
@@ -19,8 +19,9 @@
 // ---------------------------------------------------------------------
 /* */
 debRecordParser::debRecordParser(string FileName,pkgCache &Cache) : 
-                  File(FileName,FileFd::ReadOnly), 
-                  Tags(&File,Cache.Head().MaxVerFileSize + 200)
+                  File(FileName,FileFd::ReadOnlyGzip), 
+                  Tags(&File, std::max(Cache.Head().MaxVerFileSize, 
+                                      Cache.Head().MaxDescFileSize) + 200)
 {
 }
                                                                        /*}}}*/
@@ -117,7 +118,7 @@ string debRecordParser::LongDesc()
   {
      vector<string> const lang = APT::Configuration::getLanguages();
      for (vector<string>::const_iterator l = lang.begin();
-         orig.empty() && l != lang.end(); l++)
+         orig.empty() && l != lang.end(); ++l)
        orig = Section.FindS(string("Description-").append(*l).c_str());
   }