summaryrefslogtreecommitdiff
path: root/apt-pkg/indexrecords.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-17 00:14:10 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:24:01 +0200
commite8afd16892e87a6e2f17c1019ee455f5583387c2 (patch)
treed8017e9602be65572c629209c6febeb0ff263d4b /apt-pkg/indexrecords.cc
parent3d5e93f7cd6bea364ca811c7f64b5e1d4174a4ac (diff)
apply various style suggestions by cppcheck
Some of them modify the ABI, but given that we prepare a big one already, these few hardly count for much. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/indexrecords.cc')
-rw-r--r--apt-pkg/indexrecords.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 7e6da9558..5a93d826f 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -42,7 +42,7 @@ APT_PURE bool indexRecords::GetSupportsAcquireByHash() const
return this->SupportsAcquireByHash;
}
-APT_PURE bool indexRecords::CheckDist(const string MaybeDist) const
+APT_PURE bool indexRecords::CheckDist(string const &MaybeDist) const
{
return (this->Dist == MaybeDist
|| this->Suite == MaybeDist);
@@ -63,7 +63,7 @@ APT_PURE time_t indexRecords::GetDate() const
return this->Date;
}
-APT_PURE indexRecords::checkSum *indexRecords::Lookup(const string MetaKey)
+APT_PURE indexRecords::checkSum *indexRecords::Lookup(string const &MetaKey)
{
std::map<std::string, indexRecords::checkSum* >::const_iterator sum = Entries.find(MetaKey);
if (sum == Entries.end())
@@ -76,7 +76,7 @@ APT_PURE bool indexRecords::Exists(string const &MetaKey) const
return Entries.find(MetaKey) != Entries.end();
}
-bool indexRecords::Load(const string Filename) /*{{{*/
+bool indexRecords::Load(string const &Filename) /*{{{*/
{
FileFd Fd;
if (OpenMaybeClearSignedFile(Filename, Fd) == false)
@@ -272,23 +272,10 @@ void indexRecords::SetTrusted(bool const Trusted)
this->Trusted = NEVER_TRUSTED;
}
-#if APT_PKG_ABI >= 413
indexRecords::indexRecords(const string &ExpectedDist) :
Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
SupportsAcquireByHash(false)
{
}
-#else
-indexRecords::indexRecords() :
- Trusted(CHECK_TRUST), d(NULL), ExpectedDist(""), ValidUntil(0),
- SupportsAcquireByHash(false)
-{
-}
-indexRecords::indexRecords(const string ExpectedDist) :
- Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
- SupportsAcquireByHash(false)
-{
-}
-#endif
indexRecords::~indexRecords() {}