diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-06-17 00:14:10 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-08-10 17:24:01 +0200 |
commit | e8afd16892e87a6e2f17c1019ee455f5583387c2 (patch) | |
tree | d8017e9602be65572c629209c6febeb0ff263d4b /apt-pkg/cacheset.h | |
parent | 3d5e93f7cd6bea364ca811c7f64b5e1d4174a4ac (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/cacheset.h')
-rw-r--r-- | apt-pkg/cacheset.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 1a6feb5f7..7fd740335 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -265,7 +265,7 @@ APT_IGNORE_DEPRECATED_POP 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) { @@ -310,7 +310,7 @@ 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; } @@ -324,7 +324,7 @@ 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; } @@ -359,7 +359,7 @@ public: /*{{{*/ 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 @@ -568,7 +568,7 @@ public: 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: @@ -744,7 +744,7 @@ 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; } @@ -758,7 +758,7 @@ 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; } |