summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3d5e93f)
Some of them modify the ABI, but given that we prepare a big one
already, these few hardly count for much.
Git-Dch: Ignore
31 files changed:
-static HashStringList GetExpectedHashesFromFor(indexRecords * const Parser, std::string const MetaKey)/*{{{*/
+static HashStringList GetExpectedHashesFromFor(indexRecords * const Parser, std::string const &MetaKey)/*{{{*/
{
if (Parser == NULL)
return HashStringList();
{
if (Parser == NULL)
return HashStringList();
virtual std::string DescURI() const {return Target.URI;};
virtual HashStringList GetExpectedHashes() const {return HashStringList();};
virtual std::string DescURI() const {return Target.URI;};
virtual HashStringList GetExpectedHashes() const {return HashStringList();};
- NoActionItem(pkgAcquire * const Owner, IndexTarget const Target) :
+ NoActionItem(pkgAcquire * const Owner, IndexTarget const &Target) :
pkgAcquire::Item(Owner), Target(Target)
{
Status = StatDone;
pkgAcquire::Item(Owner), Target(Target)
{
Status = StatDone;
// Acquire::Item::Item - Constructor /*{{{*/
APT_IGNORE_DEPRECATED_PUSH
// Acquire::Item::Item - Constructor /*{{{*/
APT_IGNORE_DEPRECATED_PUSH
-pkgAcquire::Item::Item(pkgAcquire * const Owner) :
+pkgAcquire::Item::Item(pkgAcquire * const owner) :
FileSize(0), PartialSize(0), Mode(0), ID(0), Complete(false), Local(false),
FileSize(0), PartialSize(0), Mode(0), ID(0), Complete(false), Local(false),
- QueueCounter(0), ExpectedAdditionalItems(0), Owner(Owner)
+ QueueCounter(0), ExpectedAdditionalItems(0), Owner(owner)
{
Owner->Add(this);
Status = StatIdle;
{
Owner->Add(this);
Status = StatIdle;
/*}}}*/
pkgAcqTransactionItem::pkgAcqTransactionItem(pkgAcquire * const Owner, /*{{{*/
/*}}}*/
pkgAcqTransactionItem::pkgAcqTransactionItem(pkgAcquire * const Owner, /*{{{*/
- pkgAcqMetaBase * const TransactionManager, IndexTarget const Target) :
- pkgAcquire::Item(Owner), Target(Target), TransactionManager(TransactionManager)
+ pkgAcqMetaBase * const transactionManager, IndexTarget const &target) :
+ pkgAcquire::Item(Owner), Target(target), TransactionManager(transactionManager)
{
if (TransactionManager != this)
TransactionManager->Add(this);
{
if (TransactionManager != this)
TransactionManager->Add(this);
-HashStringList pkgAcqTransactionItem::GetExpectedHashesFor(std::string const MetaKey) const /*{{{*/
+HashStringList pkgAcqTransactionItem::GetExpectedHashesFor(std::string const &MetaKey) const /*{{{*/
{
return GetExpectedHashesFromFor(TransactionManager->MetaIndexParser, MetaKey);
}
{
return GetExpectedHashesFromFor(TransactionManager->MetaIndexParser, MetaKey);
}
// AcqMetaBase - Constructor /*{{{*/
pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqMetaBase - Constructor /*{{{*/
pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- std::vector<IndexTarget> const IndexTargets,
+ std::vector<IndexTarget> const &IndexTargets,
IndexTarget const &DataTarget,
indexRecords * const MetaIndexParser)
: pkgAcqTransactionItem(Owner, TransactionManager, DataTarget),
IndexTarget const &DataTarget,
indexRecords * const MetaIndexParser)
: pkgAcqTransactionItem(Owner, TransactionManager, DataTarget),
pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire * const Owner, /*{{{*/
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget, IndexTarget const &DetachedSigTarget,
pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire * const Owner, /*{{{*/
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget, IndexTarget const &DetachedSigTarget,
- std::vector<IndexTarget> const IndexTargets,
+ std::vector<IndexTarget> const &IndexTargets,
indexRecords * const MetaIndexParser) :
pkgAcqMetaIndex(Owner, this, ClearsignedTarget, DetachedSigTarget, IndexTargets, MetaIndexParser),
ClearsignedTarget(ClearsignedTarget),
indexRecords * const MetaIndexParser) :
pkgAcqMetaIndex(Owner, this, ClearsignedTarget, DetachedSigTarget, IndexTargets, MetaIndexParser),
ClearsignedTarget(ClearsignedTarget),
- DetachedDataTarget(DetachedDataTarget), DetachedSigTarget(DetachedSigTarget)
+ DetachedDataTarget(DetachedDataTarget)
{
// index targets + (worst case:) Release/Release.gpg
ExpectedAdditionalItems = IndexTargets.size() + 2;
{
// index targets + (worst case:) Release/Release.gpg
ExpectedAdditionalItems = IndexTargets.size() + 2;
pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget,
IndexTarget const &DetachedSigTarget,
pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget,
IndexTarget const &DetachedSigTarget,
- vector<IndexTarget> const IndexTargets,
+ vector<IndexTarget> const &IndexTargets,
indexRecords * const MetaIndexParser) :
pkgAcqMetaBase(Owner, TransactionManager, IndexTargets, DataTarget, MetaIndexParser),
DetachedSigTarget(DetachedSigTarget)
indexRecords * const MetaIndexParser) :
pkgAcqMetaBase(Owner, TransactionManager, IndexTargets, DataTarget, MetaIndexParser),
DetachedSigTarget(DetachedSigTarget)
// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target,
+ IndexTarget const &Target,
pkgAcqMetaIndex * const MetaIndex) :
pkgAcqTransactionItem(Owner, TransactionManager, Target), MetaIndex(MetaIndex)
{
pkgAcqMetaIndex * const MetaIndex) :
pkgAcqTransactionItem(Owner, TransactionManager, Target), MetaIndex(MetaIndex)
{
// AcqBaseIndex - Constructor /*{{{*/
pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqBaseIndex - Constructor /*{{{*/
pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target)
+ IndexTarget const &Target)
: pkgAcqTransactionItem(Owner, TransactionManager, Target)
{
}
: pkgAcqTransactionItem(Owner, TransactionManager, Target)
{
}
*/
pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
*/
pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target)
+ IndexTarget const &Target)
: pkgAcqBaseIndex(Owner, TransactionManager, Target)
{
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
: pkgAcqBaseIndex(Owner, TransactionManager, Target)
{
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
*/
pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
*/
pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target,
+ IndexTarget const &Target,
vector<DiffInfo> const &diffs)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
available_patches(diffs)
vector<DiffInfo> const &diffs)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
available_patches(diffs)
// AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/
pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/
pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target,
+ IndexTarget const &Target,
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
// AcqIndex::AcqIndex - Constructor /*{{{*/
pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqIndex::AcqIndex - Constructor /*{{{*/
pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target)
+ IndexTarget const &Target)
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target), Stage(STAGE_DOWNLOAD)
{
// autoselect the compression method
AutoSelectCompression();
{
// autoselect the compression method
AutoSelectCompression();
*
* \param Owner The new owner of this item.
*/
*
* \param Owner The new owner of this item.
*/
- Item(pkgAcquire * const Owner);
+ explicit Item(pkgAcquire * const Owner);
/** \brief Remove this item from its owner's queue by invoking
* pkgAcquire::Remove.
/** \brief Remove this item from its owner's queue by invoking
* pkgAcquire::Remove.
void *d;
protected:
IndexTarget const Target;
void *d;
protected:
IndexTarget const Target;
- HashStringList GetExpectedHashesFor(std::string const MetaKey) const;
+ HashStringList GetExpectedHashesFor(std::string const &MetaKey) const;
bool QueueURI(pkgAcquire::ItemDesc &Item);
bool QueueURI(pkgAcquire::ItemDesc &Item);
virtual bool HashesRequired() const;
virtual bool HashesRequired() const;
- pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const Target);
+ pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const &Target);
virtual ~pkgAcqTransactionItem();
friend class pkgAcqMetaBase;
virtual ~pkgAcqTransactionItem();
friend class pkgAcqMetaBase;
virtual std::string GetFinalFilename() const;
pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
virtual std::string GetFinalFilename() const;
pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- std::vector<IndexTarget> const IndexTargets,
+ std::vector<IndexTarget> const &IndexTargets,
IndexTarget const &DataTarget,
indexRecords* const MetaIndexParser);
virtual ~pkgAcqMetaBase();
IndexTarget const &DataTarget,
indexRecords* const MetaIndexParser);
virtual ~pkgAcqMetaBase();
/** \brief Create a new pkgAcqMetaIndex. */
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
/** \brief Create a new pkgAcqMetaIndex. */
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
- std::vector<IndexTarget> const IndexTargets, indexRecords * const MetaIndexParser);
+ std::vector<IndexTarget> const &IndexTargets, indexRecords * const MetaIndexParser);
virtual ~pkgAcqMetaIndex();
friend class pkgAcqMetaSig;
virtual ~pkgAcqMetaIndex();
friend class pkgAcqMetaSig;
pkgAcquire::MethodConfig const * const Cnf);
/** \brief Create a new pkgAcqMetaSig. */
pkgAcquire::MethodConfig const * const Cnf);
/** \brief Create a new pkgAcqMetaSig. */
- pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const Target,
+ pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const &Target,
pkgAcqMetaIndex * const MetaIndex);
virtual ~pkgAcqMetaSig();
};
pkgAcqMetaIndex * const MetaIndex);
virtual ~pkgAcqMetaSig();
};
IndexTarget const ClearsignedTarget;
IndexTarget const DetachedDataTarget;
IndexTarget const ClearsignedTarget;
IndexTarget const DetachedDataTarget;
- IndexTarget const DetachedSigTarget;
public:
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
public:
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget,
IndexTarget const &DetachedSigTarget,
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget,
IndexTarget const &DetachedSigTarget,
- std::vector<IndexTarget> const IndexTargets,
+ std::vector<IndexTarget> const &IndexTargets,
indexRecords * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
indexRecords * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
virtual std::string GetFinalFilename() const;
pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
virtual std::string GetFinalFilename() const;
pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target);
+ IndexTarget const &Target);
virtual ~pkgAcqBaseIndex();
};
/*}}}*/
virtual ~pkgAcqBaseIndex();
};
/*}}}*/
* \param ShortDesc A short description of the list file to download.
*/
pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
* \param ShortDesc A short description of the list file to download.
*/
pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target);
+ IndexTarget const &Target);
virtual ~pkgAcqDiffIndex();
private:
APT_HIDDEN void QueueOnIMSHit() const;
virtual ~pkgAcqDiffIndex();
private:
APT_HIDDEN void QueueOnIMSHit() const;
* check if it was the last one to complete the download step
*/
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
* check if it was the last one to complete the download step
*/
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target, DiffInfo const &patch,
+ IndexTarget const &Target, DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
virtual ~pkgAcqIndexMergeDiffs();
};
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
virtual ~pkgAcqIndexMergeDiffs();
};
* that depends on it.
*/
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
* that depends on it.
*/
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target,
+ IndexTarget const &Target,
std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
virtual ~pkgAcqIndexDiffs();
};
std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
virtual ~pkgAcqIndexDiffs();
};
virtual std::string GetMetaKey() const;
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
virtual std::string GetMetaKey() const;
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target);
+ IndexTarget const &Target);
virtual ~pkgAcqIndex();
private:
virtual ~pkgAcqIndex();
private:
// ---------------------------------------------------------------------
/* */
pkgAcquire::Worker::Worker(Queue *Q,MethodConfig *Cnf,
// ---------------------------------------------------------------------
/* */
pkgAcquire::Worker::Worker(Queue *Q,MethodConfig *Cnf,
- pkgAcquireStatus *Log) : Log(Log)
+ pkgAcquireStatus *log) : Log(log)
{
OwnerQ = Q;
Config = Cnf;
{
OwnerQ = Q;
Config = Cnf;
* \param Config A location in which to store information about
* the fetch method.
*/
* \param Config A location in which to store information about
* the fetch method.
*/
- Worker(MethodConfig *Config);
+ explicit Worker(MethodConfig *Config);
/** \brief Clean up this worker.
*
/** \brief Clean up this worker.
*
// Queue::Queue - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
// Queue::Queue - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgAcquire::Queue::Queue(string Name,pkgAcquire *Owner) : d(NULL), Next(0),
- Name(Name), Items(0), Workers(0), Owner(Owner), PipeDepth(0), MaxPipeDepth(1)
+pkgAcquire::Queue::Queue(string const &name,pkgAcquire * const owner) : d(NULL), Next(0),
+ Name(name), Items(0), Workers(0), Owner(owner), PipeDepth(0), MaxPipeDepth(1)
bool GetLock(std::string const &Lock);
/** \brief Construct a new pkgAcquire. */
bool GetLock(std::string const &Lock);
/** \brief Construct a new pkgAcquire. */
- pkgAcquire(pkgAcquireStatus *Log);
+ explicit pkgAcquire(pkgAcquireStatus *Log);
pkgAcquire();
/** \brief Destroy this pkgAcquire object.
pkgAcquire();
/** \brief Destroy this pkgAcquire object.
* \param Name The name of the new queue.
* \param Owner The download process that owns the new queue.
*/
* \param Name The name of the new queue.
* \param Owner The download process that owns the new queue.
*/
- Queue(std::string Name,pkgAcquire *Owner);
+ Queue(std::string const &Name,pkgAcquire * const Owner);
/** Shut down all the worker processes associated with this queue
* and empty the queue.
/** Shut down all the worker processes associated with this queue
* and empty the queue.
*
* \param Q The queue over which this UriIterator should iterate.
*/
*
* \param Q The queue over which this UriIterator should iterate.
*/
- UriIterator(pkgAcquire::Queue *Q);
+ explicit UriIterator(pkgAcquire::Queue *Q);
virtual ~UriIterator();
};
/*}}}*/
virtual ~UriIterator();
};
/*}}}*/
return (*Cache)[Pkg].CandidateVerIter(*Cache);
}
return (*Cache)[Pkg].CandidateVerIter(*Cache);
}
- Policy(pkgDepCache *Cache) : Cache(Cache) {};
+ explicit Policy(pkgDepCache *Cache) : Cache(Cache) {};
- pkgSimulate(pkgDepCache *Cache);
+ explicit pkgSimulate(pkgDepCache *Cache);
virtual ~pkgSimulate();
};
/*}}}*/
virtual ~pkgSimulate();
};
/*}}}*/
APT_DEPRECATED void InstallProtect();
APT_DEPRECATED void InstallProtect();
- pkgProblemResolver(pkgDepCache *Cache);
+ explicit pkgProblemResolver(pkgDepCache *Cache);
virtual ~pkgProblemResolver();
};
/*}}}*/
virtual ~pkgProblemResolver();
};
/*}}}*/
class NOTMatcher : public Matcher {
Matcher * const matcher;
public:
class NOTMatcher : public Matcher {
Matcher * const matcher;
public:
- NOTMatcher(Matcher * const matcher);
+ explicit NOTMatcher(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
ANDMatcher();
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
ANDMatcher();
- ANDMatcher(Matcher * const matcher1);
+ explicit ANDMatcher(Matcher * const matcher1);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
ORMatcher();
public:
// 5 ought to be enough for everybody… c++11 variadic templates would be nice
ORMatcher();
- ORMatcher(Matcher * const matcher1);
+ explicit ORMatcher(Matcher * const matcher1);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
class PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
regex_t* pattern;
public:
class PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
regex_t* pattern;
public:
- PackageNameMatchesRegEx(std::string const &Pattern);
+ explicit PackageNameMatchesRegEx(std::string const &Pattern);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual ~PackageNameMatchesRegEx();
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual ~PackageNameMatchesRegEx();
class PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
const std::string Pattern;
public:
class PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
const std::string Pattern;
public:
- PackageNameMatchesFnmatch(std::string const &Pattern);
+ explicit PackageNameMatchesFnmatch(std::string const &Pattern);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual ~PackageNameMatchesFnmatch() {};
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual ~PackageNameMatchesFnmatch() {};
class PackageIsNewInstall : public PackageMatcher { /*{{{*/
pkgCacheFile * const Cache;
public:
class PackageIsNewInstall : public PackageMatcher { /*{{{*/
pkgCacheFile * const Cache;
public:
- PackageIsNewInstall(pkgCacheFile * const Cache);
+ explicit PackageIsNewInstall(pkgCacheFile * const Cache);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual ~PackageIsNewInstall();
};
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual ~PackageIsNewInstall();
};
public:
// This constructor is the 'begin' constructor, never use it.
public:
// This constructor is the 'begin' constructor, never use it.
- inline GrpIterator(pkgCache &Owner) : Iterator<Group, GrpIterator>(Owner), HashIndex(-1) {
+ explicit inline GrpIterator(pkgCache &Owner) : Iterator<Group, GrpIterator>(Owner), HashIndex(-1) {
S = OwnerPointer();
operator ++(0);
}
S = OwnerPointer();
operator ++(0);
}
public:
// This constructor is the 'begin' constructor, never use it.
public:
// This constructor is the 'begin' constructor, never use it.
- inline PkgIterator(pkgCache &Owner) : Iterator<Package, PkgIterator>(Owner), HashIndex(-1) {
+ explicit inline PkgIterator(pkgCache &Owner) : Iterator<Package, PkgIterator>(Owner), HashIndex(-1) {
S = OwnerPointer();
operator ++(0);
}
S = OwnerPointer();
operator ++(0);
}
// Constructors
inline RlsFileIterator() : Iterator<ReleaseFile, RlsFileIterator>() {}
// Constructors
inline RlsFileIterator() : Iterator<ReleaseFile, RlsFileIterator>() {}
- inline RlsFileIterator(pkgCache &Owner) : Iterator<ReleaseFile, RlsFileIterator>(Owner, Owner.RlsFileP) {}
+ explicit inline RlsFileIterator(pkgCache &Owner) : Iterator<ReleaseFile, RlsFileIterator>(Owner, Owner.RlsFileP) {}
inline RlsFileIterator(pkgCache &Owner,ReleaseFile *Trg) : Iterator<ReleaseFile, RlsFileIterator>(Owner, Trg) {}
};
/*}}}*/
inline RlsFileIterator(pkgCache &Owner,ReleaseFile *Trg) : Iterator<ReleaseFile, RlsFileIterator>(Owner, Trg) {}
};
/*}}}*/
// Constructors
inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {}
// Constructors
inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {}
- inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgFileIterator>(Owner, Owner.PkgFileP) {}
+ explicit inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgFileIterator>(Owner, Owner.PkgFileP) {}
inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {}
};
/*}}}*/
inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {}
};
/*}}}*/
void setConstructor(CacheSetHelper::PkgSelector const by) { ConstructedBy = by; }
CacheSetHelper::PkgSelector getConstructor() const { return ConstructedBy; }
PackageContainerInterface();
void setConstructor(CacheSetHelper::PkgSelector const by) { ConstructedBy = by; }
CacheSetHelper::PkgSelector getConstructor() const { return ConstructedBy; }
PackageContainerInterface();
- PackageContainerInterface(CacheSetHelper::PkgSelector const by);
+ explicit PackageContainerInterface(CacheSetHelper::PkgSelector const by);
virtual ~PackageContainerInterface();
APT_DEPRECATED static bool FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
virtual ~PackageContainerInterface();
APT_DEPRECATED static bool FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
public std::iterator<std::forward_iterator_tag, typename Container::const_iterator> {
typename Container::const_iterator _iter;
public:
public std::iterator<std::forward_iterator_tag, typename Container::const_iterator> {
typename Container::const_iterator _iter;
public:
- const_iterator(typename Container::const_iterator i) : _iter(i) {}
+ explicit const_iterator(typename Container::const_iterator i) : _iter(i) {}
pkgCache::PkgIterator getPkg(void) const { return *_iter; }
inline pkgCache::PkgIterator operator*(void) const { return *_iter; }
operator typename Container::const_iterator(void) const { return _iter; }
pkgCache::PkgIterator getPkg(void) const { return *_iter; }
inline pkgCache::PkgIterator operator*(void) const { return *_iter; }
operator typename Container::const_iterator(void) const { return _iter; }
public std::iterator<std::forward_iterator_tag, typename Container::iterator> {
typename Container::iterator _iter;
public:
public std::iterator<std::forward_iterator_tag, typename Container::iterator> {
typename Container::iterator _iter;
public:
- iterator(typename Container::iterator i) : _iter(i) {}
+ explicit iterator(typename Container::iterator i) : _iter(i) {}
pkgCache::PkgIterator getPkg(void) const { return *_iter; }
inline pkgCache::PkgIterator operator*(void) const { return *_iter; }
operator typename Container::iterator(void) const { return _iter; }
pkgCache::PkgIterator getPkg(void) const { return *_iter; }
inline pkgCache::PkgIterator operator*(void) const { return *_iter; }
operator typename Container::iterator(void) const { return _iter; }
const_iterator find(pkgCache::PkgIterator const &P) const { return const_iterator(_cont.find(P)); }
PackageContainer() : PackageContainerInterface(CacheSetHelper::UNKNOWN) {}
const_iterator find(pkgCache::PkgIterator const &P) const { return const_iterator(_cont.find(P)); }
PackageContainer() : PackageContainerInterface(CacheSetHelper::UNKNOWN) {}
- PackageContainer(CacheSetHelper::PkgSelector const &by) : PackageContainerInterface(by) {}
+ explicit PackageContainer(CacheSetHelper::PkgSelector const &by) : PackageContainerInterface(by) {}
APT_IGNORE_DEPRECATED_PUSH
APT_DEPRECATED PackageContainer(Constructor const &by) : PackageContainerInterface((CacheSetHelper::PkgSelector)by) {}
APT_IGNORE_DEPRECATED_POP
APT_IGNORE_DEPRECATED_PUSH
APT_DEPRECATED PackageContainer(Constructor const &by) : PackageContainerInterface((CacheSetHelper::PkgSelector)by) {}
APT_IGNORE_DEPRECATED_POP
APT_PUBLIC iterator begin() { return _cont->PkgBegin(); }
APT_PUBLIC iterator end() { return _cont->PkgEnd(); }
APT_PUBLIC iterator begin() { return _cont->PkgBegin(); }
APT_PUBLIC iterator end() { return _cont->PkgEnd(); }
- APT_PUBLIC PackageUniverse(pkgCache * const Owner);
+ explicit APT_PUBLIC PackageUniverse(pkgCache * const Owner);
APT_PUBLIC virtual ~PackageUniverse();
private:
APT_PUBLIC virtual ~PackageUniverse();
private:
public std::iterator<std::forward_iterator_tag, typename Container::const_iterator> {/*{{{*/
typename Container::const_iterator _iter;
public:
public std::iterator<std::forward_iterator_tag, typename Container::const_iterator> {/*{{{*/
typename Container::const_iterator _iter;
public:
- const_iterator(typename Container::const_iterator i) : _iter(i) {}
+ explicit const_iterator(typename Container::const_iterator i) : _iter(i) {}
pkgCache::VerIterator getVer(void) const { return *_iter; }
inline pkgCache::VerIterator operator*(void) const { return *_iter; }
operator typename Container::const_iterator(void) const { return _iter; }
pkgCache::VerIterator getVer(void) const { return *_iter; }
inline pkgCache::VerIterator operator*(void) const { return *_iter; }
operator typename Container::const_iterator(void) const { return _iter; }
public std::iterator<std::forward_iterator_tag, typename Container::iterator> {
typename Container::iterator _iter;
public:
public std::iterator<std::forward_iterator_tag, typename Container::iterator> {
typename Container::iterator _iter;
public:
- iterator(typename Container::iterator i) : _iter(i) {}
+ explicit iterator(typename Container::iterator i) : _iter(i) {}
pkgCache::VerIterator getVer(void) const { return *_iter; }
inline pkgCache::VerIterator operator*(void) const { return *_iter; }
operator typename Container::iterator(void) const { return _iter; }
pkgCache::VerIterator getVer(void) const { return *_iter; }
inline pkgCache::VerIterator operator*(void) const { return *_iter; }
operator typename Container::iterator(void) const { return _iter; }
unsigned long long FileSize;
unsigned int CalcHashes;
unsigned long long FileSize;
unsigned int CalcHashes;
- PrivateHashes(unsigned int const CalcHashes) : FileSize(0), CalcHashes(CalcHashes) {}
+ explicit PrivateHashes(unsigned int const CalcHashes) : FileSize(0), CalcHashes(CalcHashes) {}
};
/*}}}*/
// Hashes::Add* - Add the contents of data or FD /*{{{*/
};
/*}}}*/
// Hashes::Add* - Add the contents of data or FD /*{{{*/
- HashSumValue(std::string Str)
+ explicit HashSumValue(std::string const &Str)
{
memset(Sum,0,sizeof(Sum));
Set(Str);
{
memset(Sum,0,sizeof(Sum));
Set(Str);
va_list args;
ssize_t size = 400;
while (true) {
va_list args;
ssize_t size = 400;
while (true) {
va_start(args,format);
ret = iovprintf(out, format, args, size);
va_end(args);
va_start(args,format);
ret = iovprintf(out, format, args, size);
va_end(args);
ssize_t size = 400;
std::ostringstream outstr;
while (true) {
ssize_t size = 400;
std::ostringstream outstr;
while (true) {
va_start(args,format);
ret = iovprintf(outstr, format, args, size);
va_end(args);
va_start(args,format);
ret = iovprintf(outstr, format, args, size);
va_end(args);
}
template<typename CallC>
}
template<typename CallC>
-void foreachTarget(std::string const URI, std::string const Dist,
+void foreachTarget(std::string const &URI, std::string const &Dist,
std::map<std::string, std::vector<debReleaseIndex::debSectionEntry const *> > const &ArchEntries,
CallC &Call)
{
std::map<std::string, std::vector<debReleaseIndex::debSectionEntry const *> > const &ArchEntries,
CallC &Call)
{
// ---------------------------------------------------------------------
/* */
pkgDepCache::pkgDepCache(pkgCache *pCache,Policy *Plcy) :
// ---------------------------------------------------------------------
/* */
pkgDepCache::pkgDepCache(pkgCache *pCache,Policy *Plcy) :
- group_level(0), Cache(pCache), PkgState(0), DepState(0)
+ group_level(0), Cache(pCache), PkgState(0), DepState(0),
+ iUsrSize(0), iDownloadSize(0), iInstCount(0), iDelCount(0), iKeepCount(0),
+ iBrokenCount(0), iPolicyBrokenCount(0), iBadCount(0)
{
DebugMarker = _config->FindB("Debug::pkgDepCache::Marker", false);
DebugAutoInstall = _config->FindB("Debug::pkgDepCache::AutoInstall", false);
{
DebugMarker = _config->FindB("Debug::pkgDepCache::Marker", false);
DebugAutoInstall = _config->FindB("Debug::pkgDepCache::AutoInstall", false);
/* */
struct CompareProviders {
pkgCache::PkgIterator const Pkg;
/* */
struct CompareProviders {
pkgCache::PkgIterator const Pkg;
- CompareProviders(pkgCache::DepIterator const &Dep) : Pkg(Dep.TargetPkg()) {};
+ explicit CompareProviders(pkgCache::DepIterator const &Dep) : Pkg(Dep.TargetPkg()) {};
//bool operator() (APT::VersionList::iterator const &AV, APT::VersionList::iterator const &BV)
bool operator() (pkgCache::VerIterator const &AV, pkgCache::VerIterator const &BV)
{
//bool operator() (APT::VersionList::iterator const &AV, APT::VersionList::iterator const &BV)
bool operator() (pkgCache::VerIterator const &AV, pkgCache::VerIterator const &BV)
{
* As long as this object exists, no automatic cleanup
* operations will be undertaken.
*/
* As long as this object exists, no automatic cleanup
* operations will be undertaken.
*/
- ActionGroup(pkgDepCache &cache);
+ explicit ActionGroup(pkgDepCache &cache);
/** \brief Clean up the action group before it is destroyed.
*
/** \brief Clean up the action group before it is destroyed.
*
// PackageCopy::RewriteEntry - Rewrite the entry with a new filename /*{{{*/
bool PackageCopy::RewriteEntry(FileFd &Target,string const &File)
{
// PackageCopy::RewriteEntry - Rewrite the entry with a new filename /*{{{*/
bool PackageCopy::RewriteEntry(FileFd &Target,string const &File)
{
- string const Dir(File,0,File.rfind('/'));
std::vector<pkgTagSection::Tag> Changes;
Changes.push_back(pkgTagSection::Tag::Rewrite("Filename", File));
std::vector<pkgTagSection::Tag> Changes;
Changes.push_back(pkgTagSection::Tag::Rewrite("Filename", File));
bool IsTrusted() const { return Trusted; };
bool IsTrusted() const { return Trusted; };
- pkgIndexFile(bool Trusted);
+ explicit pkgIndexFile(bool Trusted);
virtual ~pkgIndexFile();
};
virtual ~pkgIndexFile();
};
return this->SupportsAcquireByHash;
}
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);
{
return (this->Dist == MaybeDist
|| this->Suite == MaybeDist);
-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())
{
std::map<std::string, indexRecords::checkSum* >::const_iterator sum = Entries.find(MetaKey);
if (sum == Entries.end())
return Entries.find(MetaKey) != Entries.end();
}
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)
{
FileFd Fd;
if (OpenMaybeClearSignedFile(Filename, Fd) == false)
this->Trusted = NEVER_TRUSTED;
}
this->Trusted = NEVER_TRUSTED;
}
indexRecords::indexRecords(const string &ExpectedDist) :
Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
SupportsAcquireByHash(false)
{
}
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() {}
indexRecords::~indexRecords() {}
std::map<std::string,checkSum *> Entries;
public:
std::map<std::string,checkSum *> Entries;
public:
-#if APT_PKG_ABI >= 413
- indexRecords(const std::string &ExpectedDist = "");
-#else
- indexRecords();
- indexRecords(const std::string ExpectedDist);
-#endif
+ explicit indexRecords(const std::string &ExpectedDist = "");
- virtual checkSum *Lookup(const std::string MetaKey);
+ virtual checkSum *Lookup(std::string const &MetaKey);
/** \brief tests if a checksum for this file is available */
bool Exists(std::string const &MetaKey) const;
std::vector<std::string> MetaKeys();
/** \brief tests if a checksum for this file is available */
bool Exists(std::string const &MetaKey) const;
std::vector<std::string> MetaKeys();
- virtual bool Load(std::string Filename);
- virtual bool CheckDist(const std::string MaybeDist) const;
+ virtual bool Load(std::string const &Filename);
+ virtual bool CheckDist(std::string const &MaybeDist) const;
std::string GetDist() const;
std::string GetSuite() const;
std::string GetDist() const;
std::string GetSuite() const;
void WriteToStatusFd(std::string msg);
public:
void WriteToStatusFd(std::string msg);
public:
- PackageManagerProgressFd(int progress_fd);
+ explicit PackageManagerProgressFd(int progress_fd);
virtual ~PackageManagerProgressFd();
virtual void StartDpkg();
virtual ~PackageManagerProgressFd();
virtual void StartDpkg();
void WriteToStatusFd(std::string msg);
public:
void WriteToStatusFd(std::string msg);
public:
- PackageManagerProgressDeb822Fd(int progress_fd);
+ explicit PackageManagerProgressDeb822Fd(int progress_fd);
virtual ~PackageManagerProgressDeb822Fd();
virtual void StartDpkg();
virtual ~PackageManagerProgressDeb822Fd();
virtual void StartDpkg();
int Score(PkgIterator Pkg);
int Score(PkgIterator Pkg);
- pkgOrderList(pkgDepCache *Cache);
+ explicit pkgOrderList(pkgDepCache *Cache);
virtual ~pkgOrderList();
};
virtual ~pkgOrderList();
};
/** \brief returns all packages dpkg let disappear */
inline std::set<std::string> GetDisappearedPackages() { return disappearedPkgs; };
/** \brief returns all packages dpkg let disappear */
inline std::set<std::string> GetDisappearedPackages() { return disappearedPkgs; };
- pkgPackageManager(pkgDepCache *Cache);
+ explicit pkgPackageManager(pkgDepCache *Cache);
virtual ~pkgPackageManager();
private:
virtual ~pkgPackageManager();
private:
template<typename Iter> class Dynamic {
public:
static std::vector<Iter*> toReMap;
template<typename Iter> class Dynamic {
public:
static std::vector<Iter*> toReMap;
+ explicit Dynamic(Iter &I) {
Parser &Lookup(pkgCache::DescFileIterator const &Desc);
// Construct destruct
Parser &Lookup(pkgCache::DescFileIterator const &Desc);
// Construct destruct
- pkgRecords(pkgCache &Cache);
+ explicit pkgRecords(pkgCache &Cache);
virtual ~pkgRecords();
};
/*}}}*/
virtual ~pkgRecords();
};
/*}}}*/
struct PkgPin : Pin
{
std::string Pkg;
struct PkgPin : Pin
{
std::string Pkg;
- PkgPin(std::string const &Pkg) : Pin(), Pkg(Pkg) {};
+ explicit PkgPin(std::string const &Pkg) : Pin(), Pkg(Pkg) {};
- pkgPolicy(pkgCache *Owner);
+ explicit pkgPolicy(pkgCache *Owner);
virtual ~pkgPolicy();
private:
pkgCache::VerIterator GetCandidateVerNew(pkgCache::PkgIterator const &Pkg);
virtual ~pkgPolicy();
private:
pkgCache::VerIterator GetCandidateVerNew(pkgCache::PkgIterator const &Pkg);
time_t GetLastModifiedTime();
pkgSourceList();
time_t GetLastModifiedTime();
pkgSourceList();
- pkgSourceList(std::string File);
+ explicit pkgSourceList(std::string File);
virtual ~pkgSourceList();
};
virtual ~pkgSourceList();
};
+
+
+pkgSrcRecords::Parser::Parser(const pkgIndexFile *Index) : iIndex(Index) {}
+pkgSrcRecords::Parser::~Parser() {}
// Abstract parser for each source record
class Parser
{
// Abstract parser for each source record
class Parser
{
protected:
const pkgIndexFile *iIndex;
protected:
const pkgIndexFile *iIndex;
virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
bool Files2(std::vector<pkgSrcRecords::File2> &F);
virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
bool Files2(std::vector<pkgSrcRecords::File2> &F);
-
- Parser(const pkgIndexFile *Index) : iIndex(Index) {};
- virtual ~Parser() {};
+
+ explicit Parser(const pkgIndexFile *Index);
+ virtual ~Parser();
// Locate a package by name and return pointer to the Parser.
// The pointer is owned by libapt.
Parser* Find(const char *Package,bool const &SrcOnly = false);
// Locate a package by name and return pointer to the Parser.
// The pointer is owned by libapt.
Parser* Find(const char *Package,bool const &SrcOnly = false);
-
- pkgSrcRecords(pkgSourceList &List);
+
+ explicit pkgSrcRecords(pkgSourceList &List);
virtual ~pkgSrcRecords();
};
virtual ~pkgSrcRecords();
};
unsigned int StartValue;
unsigned int NextInBucket;
unsigned int StartValue;
unsigned int NextInBucket;
- TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
+ explicit TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
};
std::vector<TagData> Tags;
};
};
std::vector<TagData> Tags;
};
unsigned long ControlLen;
public:
unsigned long ControlLen;
public:
- DebFile(const char *FileName);
+ explicit DebFile(const char *FileName);
~DebFile();
bool DoItem(Item &I, int &fd);
bool Process(pkgDirStream::Item &I, const unsigned char *data,
~DebFile();
bool DoItem(Item &I, int &fd);
bool Process(pkgDirStream::Item &I, const unsigned char *data,