summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/apt-ftparchive.cc8
-rw-r--r--ftparchive/cachedb.h2
-rw-r--r--ftparchive/contents.cc2
3 files changed, 6 insertions, 6 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index c7e38badf..bb3ade1e8 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -819,12 +819,12 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup,
_error->DumpErrors();
// Do the generation for Packages
- for (End = List; End->Str != 0; End++)
+ for (End = List; End->Str != 0; ++End)
{
if (End->Hit == false)
continue;
- PackageMap *I = (PackageMap *)End->UserData;
+ PackageMap * const I = static_cast<PackageMap *>(End->UserData);
if (I->PkgDone == true)
continue;
if (I->GenPackages(Setup,Stats) == false)
@@ -832,12 +832,12 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup,
}
// Do the generation for Sources
- for (End = List; End->Str != 0; End++)
+ for (End = List; End->Str != 0; ++End)
{
if (End->Hit == false)
continue;
- PackageMap *I = (PackageMap *)End->UserData;
+ PackageMap * const I = static_cast<PackageMap *>(End->UserData);
if (I->SrcDone == true)
continue;
if (I->GenSources(Setup,SrcStats) == false)
diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h
index 613963f6f..417c25a9f 100644
--- a/ftparchive/cachedb.h
+++ b/ftparchive/cachedb.h
@@ -189,7 +189,7 @@ class CacheDB
bool Clean();
- CacheDB(std::string const &DB);
+ explicit CacheDB(std::string const &DB);
~CacheDB();
};
diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc
index 145f3910e..0ce15b3d6 100644
--- a/ftparchive/contents.cc
+++ b/ftparchive/contents.cc
@@ -100,7 +100,7 @@ void *GenContents::Node::operator new(size_t Amount,GenContents *Owner)
if (Owner->NodeLeft == 0)
{
Owner->NodeLeft = 10000;
- Owner->NodePool = (Node *)malloc(Amount*Owner->NodeLeft);
+ Owner->NodePool = static_cast<Node *>(malloc(Amount*Owner->NodeLeft));
BigBlock *Block = new BigBlock;
Block->Block = Owner->NodePool;
Block->Next = Owner->BlockList;