summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-04-30 15:54:36 +0000
committerJulian Andres Klode <jak@debian.org>2019-04-30 15:54:36 +0000
commite547a738922b434ae0bad32ead26a1a3c2095d1e (patch)
treeef6120b02fd07a1edac2c3be30a17a3141adfdc8 /apt-pkg/contrib/hashes.h
parent4fa03143eee3776e2fa8fbd59d3cbaea40be0871 (diff)
parentaf74a9e2d55d6a9532eb3fbb9b96c65b7ddc1e4d (diff)
Merge branch 'pu/explicit-constructors' into 'master'
Use explicit constructors See merge request apt-team/apt!61
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 9ef2945d7..c636852ec 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -47,7 +47,7 @@ class HashString
public:
HashString(std::string Type, std::string Hash);
- HashString(std::string StringedHashString); // init from str as "type:hash"
+ explicit HashString(std::string StringedHashString); // init from str as "type:hash"
HashString();
// get hash type used
@@ -163,11 +163,11 @@ class HashStringList
HashStringList() {}
// simplifying API-compatibility constructors
- HashStringList(std::string const &hash) {
+ explicit HashStringList(std::string const &hash) {
if (hash.empty() == false)
list.push_back(HashString(hash));
}
- HashStringList(char const * const hash) {
+ explicit HashStringList(char const * const hash) {
if (hash != NULL && hash[0] != '\0')
list.push_back(HashString(hash));
}
@@ -210,9 +210,9 @@ class Hashes
* which hashes to generate. */
Hashes();
/** @param Hashes bitflag composed of #SupportedHashes */
- Hashes(unsigned int const Hashes);
+ explicit Hashes(unsigned int const Hashes);
/** @param Hashes is a list of hashes */
- Hashes(HashStringList const &Hashes);
+ explicit Hashes(HashStringList const &Hashes);
virtual ~Hashes();
};