summaryrefslogtreecommitdiff
path: root/apt-pkg/indexcopy.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
commit74b220028595342028e3309002e4ec359af328f9 (patch)
tree0132b7fd4b4f5fa5e2dbce1f2e0fbeeff2c8e101 /apt-pkg/indexcopy.cc
parent650faab01603caac04494d54cf6b10a65c00ea13 (diff)
parentb11fe392b2245354591296df88c3be2e6218af12 (diff)
merge with debian/experimental
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r--apt-pkg/indexcopy.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index f52ecbbcb..4df018ef4 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -46,7 +46,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
pkgCdromStatus *log)
{
OpProgress *Progress = NULL;
- if (List.size() == 0)
+ if (List.empty() == true)
return true;
if(log)
@@ -57,7 +57,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
// Prepare the progress indicator
off_t TotalSize = 0;
- for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
{
struct stat Buf;
if (stat(string(*I + GetFileName()).c_str(),&Buf) != 0 &&
@@ -71,7 +71,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
unsigned int NotFound = 0;
unsigned int WrongSize = 0;
unsigned int Packages = 0;
- for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
{
string OrigPath = string(*I,CDROM.length());
off_t FileSize = 0;
@@ -586,13 +586,13 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/
bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList, /*{{{*/
vector<string> PkgList,vector<string> SrcList)
{
- if (SigList.size() == 0)
+ if (SigList.empty() == true)
return true;
bool Debug = _config->FindB("Debug::aptcdrom",false);
// Read all Release files
- for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); I++)
+ for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); ++I)
{
if(Debug)
cout << "Signature verify for: " << *I << endl;
@@ -636,7 +636,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
// go over the Indexfiles and see if they verify
// if so, remove them from our copy of the lists
vector<string> keys = MetaIndex->MetaKeys();
- for (vector<string>::iterator I = keys.begin(); I != keys.end(); I++)
+ for (vector<string>::iterator I = keys.begin(); I != keys.end(); ++I)
{
if(!Verify(prefix,*I, MetaIndex)) {
// something went wrong, don't copy the Release.gpg
@@ -779,7 +779,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
vector<string> &List, pkgCdromStatus *log)
{
OpProgress *Progress = NULL;
- if (List.size() == 0)
+ if (List.empty() == true)
return true;
if(log)
@@ -789,7 +789,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
// Prepare the progress indicator
off_t TotalSize = 0;
- for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
{
struct stat Buf;
if (stat(string(*I).c_str(),&Buf) != 0 &&
@@ -803,7 +803,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
unsigned int NotFound = 0;
unsigned int WrongSize = 0;
unsigned int Packages = 0;
- for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<string>::iterator I = List.begin(); I != List.end(); ++I)
{
string OrigPath = string(*I,CDROM.length());
off_t FileSize = 0;
@@ -888,7 +888,6 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
this->Section = &Section;
string Prefix;
unsigned long Hits = 0;
- unsigned long Chop = 0;
while (Parser.Step(Section) == true)
{
if(Progress)
@@ -906,7 +905,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
fclose(TargetFl);
if (Debug == true)
- cout << " Processed by using Prefix '" << Prefix << "' and chop " << Chop << endl;
+ cout << " Processed by using Prefix '" << Prefix << "' and chop " << endl;
if (_config->FindB("APT::CDROM::NoAct",false) == false)
{