diff options
| author | Julian Andres Klode <jak@debian.org> | 2020-02-26 18:42:13 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2020-02-26 18:42:13 +0000 |
| commit | c38e0047d95305e5984e822f670055cde6aa5f6a (patch) | |
| tree | 71eb37d2df34eebc91cffbb46a879bd21a12b8e7 /apt-pkg | |
| parent | a096b580694cb36f29cdbce8f1db797a08e36709 (diff) | |
| parent | 62ca61ff4ac794f9c42335d8286343149d4313d1 (diff) | |
Merge branch 'pu/misc' into 'master'
Pu/misc
See merge request apt-team/apt!107
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/cachefilter-patterns.h | 2 | ||||
| -rw-r--r-- | apt-pkg/cacheset.cc | 4 | ||||
| -rw-r--r-- | apt-pkg/cacheset.h | 8 | ||||
| -rw-r--r-- | apt-pkg/contrib/strutl.cc | 4 | ||||
| -rw-r--r-- | apt-pkg/edsp/edspsystem.h | 2 | ||||
| -rw-r--r-- | apt-pkg/metaindex.cc | 6 | ||||
| -rw-r--r-- | apt-pkg/tagfile.cc | 5 |
7 files changed, 15 insertions, 16 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h index 2071c80b3..0c0dafa15 100644 --- a/apt-pkg/cachefilter-patterns.h +++ b/apt-pkg/cachefilter-patterns.h @@ -261,7 +261,7 @@ struct APT_HIDDEN PackageIsVirtual : public PackageMatcher struct APT_HIDDEN VersionAnyMatcher : public Matcher { - bool operator()(pkgCache::GrpIterator const &Grp) override { return false; } + bool operator()(pkgCache::GrpIterator const &) override { return false; } bool operator()(pkgCache::VerIterator const &Ver) override = 0; bool operator()(pkgCache::PkgIterator const &Pkg) override { diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index ae1d5ee3e..288180f16 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -915,6 +915,7 @@ CacheSetHelper::CacheSetHelper(bool const ShowError, GlobalError::MsgType ErrorT CacheSetHelper::~CacheSetHelper() {} PackageContainerInterface::PackageContainerInterface() : ConstructedBy(CacheSetHelper::UNKNOWN), d(NULL) {} +PackageContainerInterface::PackageContainerInterface(PackageContainerInterface const &by) : PackageContainerInterface() { *this = by; } PackageContainerInterface::PackageContainerInterface(CacheSetHelper::PkgSelector const by) : ConstructedBy(by), d(NULL) {} PackageContainerInterface& PackageContainerInterface::operator=(PackageContainerInterface const &other) { if (this != &other) @@ -928,6 +929,9 @@ PackageUniverse::PackageUniverse(pkgCacheFile * const Owner) : _cont(Owner->GetP PackageUniverse::~PackageUniverse() {} VersionContainerInterface::VersionContainerInterface() : d(NULL) {} +VersionContainerInterface::VersionContainerInterface(VersionContainerInterface const &other) : VersionContainerInterface() { + *this = other; +}; VersionContainerInterface& VersionContainerInterface::operator=(VersionContainerInterface const &) { return *this; } diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 6023b861d..bfb9e0abf 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -201,7 +201,7 @@ template<typename Interface, typename Master, typename iterator_type, typename c protected: container_iterator _iter; public: - explicit Container_iterator_base(container_iterator i) : _iter(i) {} + explicit Container_iterator_base(container_iterator const &i) : _iter(i) {} inline container_value operator*(void) const { return static_cast<iterator_type const*>(this)->getType(); }; operator container_iterator(void) const { return _iter; } inline iterator_type& operator++() { ++_iter; return static_cast<iterator_type&>(*this); } @@ -241,12 +241,10 @@ template<class Interface, class Container, class Master> class Container_iterato typedef Container_iterator<Interface, Container, Master> iterator_type; typedef typename Container::iterator container_iterator; public: - explicit Container_iterator(container_iterator i) : + explicit Container_iterator(container_iterator const &i) : Container_iterator_base<Interface, Master, iterator_type, container_iterator, typename Container::value_type>(i) {} operator typename Master::const_iterator() { return typename Master::const_iterator(this->_iter); } - inline iterator_type& operator=(iterator_type const &i) { this->_iter = i._iter; return static_cast<iterator_type&>(*this); } - inline iterator_type& operator=(container_iterator const &i) { this->_iter = i; return static_cast<iterator_type&>(*this); } inline typename Container::iterator::reference operator*(void) const { return *this->_iter; } inline typename Container::value_type getType(void) const { return *this->_iter; } @@ -325,6 +323,7 @@ public: CacheSetHelper::PkgSelector getConstructor() const { return ConstructedBy; } PackageContainerInterface(); explicit PackageContainerInterface(CacheSetHelper::PkgSelector const by); + PackageContainerInterface(PackageContainerInterface const &by); PackageContainerInterface& operator=(PackageContainerInterface const &other); virtual ~PackageContainerInterface(); @@ -762,6 +761,7 @@ public: CacheSetHelper &helper); VersionContainerInterface(); + VersionContainerInterface(VersionContainerInterface const &other); VersionContainerInterface& operator=(VersionContainerInterface const &other); virtual ~VersionContainerInterface(); private: diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 70befdc48..972472986 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1044,10 +1044,6 @@ static time_t timegm(struct tm *t) we allow them here to to be able to reuse the method. Either way, a date must be in UTC or parsing will fail. Previous implementations of this method used to ignore the timezone and assume always UTC. */ -bool RFC1123StrToTime(const char* const str,time_t &time) -{ - return RFC1123StrToTime(std::string(str), time); -} bool RFC1123StrToTime(std::string const &str,time_t &time) { unsigned short day = 0; diff --git a/apt-pkg/edsp/edspsystem.h b/apt-pkg/edsp/edspsystem.h index 9e34345cd..33f06c4d5 100644 --- a/apt-pkg/edsp/edspsystem.h +++ b/apt-pkg/edsp/edspsystem.h @@ -42,7 +42,7 @@ public: std::vector<std::string> ArchitecturesSupported() const override { return {}; }; bool LockInner() override { return _error->Error("LockInner is not implemented"); }; - bool UnLockInner(bool NoErrors=false) override { return _error->Error("UnLockInner is not implemented"); }; + bool UnLockInner(bool) override { return _error->Error("UnLockInner is not implemented"); }; bool IsLocked() override { return true; }; explicit edspLikeSystem(char const * const Label); diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc index 06db06f83..fc03f3db0 100644 --- a/apt-pkg/metaindex.cc +++ b/apt-pkg/metaindex.cc @@ -131,17 +131,17 @@ void metaIndex::swapLoad(metaIndex * const OldMetaIndex) /*{{{*/ } /*}}}*/ -bool metaIndex::IsArchitectureSupported(std::string const &arch) const /*{{{*/ +bool metaIndex::IsArchitectureSupported(std::string const &) const /*{{{*/ { return true; } /*}}}*/ -bool metaIndex::IsArchitectureAllSupportedFor(IndexTarget const &target) const/*{{{*/ +bool metaIndex::IsArchitectureAllSupportedFor(IndexTarget const &) const/*{{{*/ { return true; } /*}}}*/ -bool metaIndex::HasSupportForComponent(std::string const &component) const/*{{{*/ +bool metaIndex::HasSupportForComponent(std::string const &) const/*{{{*/ { return true; } diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 0f0d8c9a7..52000c6b9 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -513,7 +513,6 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R return false; pkgTagSectionPrivate::TagData lastTagData(0); - lastTagData.EndTag = 0; Key lastTagKey = Key::Unknown; unsigned int lastTagHash = 0; while (Stop < End) @@ -529,7 +528,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R if (isspace_ascii(Stop[0]) == 0) { // store the last found tag - if (lastTagData.EndTag != 0) + if (lastTagData.StartValue != 0) { if (lastTagKey != Key::Unknown) { AlphaIndexes[static_cast<size_t>(lastTagKey)] = TagCount; @@ -579,7 +578,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength, bool const R // Double newline marks the end of the record if (Stop+1 < End && Stop[1] == '\n') { - if (lastTagData.EndTag != 0) + if (lastTagData.StartValue != 0) { if (lastTagKey != Key::Unknown) { AlphaIndexes[static_cast<size_t>(lastTagKey)] = TagCount; |
