summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-01-08 21:19:32 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-08 21:20:25 +0100
commitaf4899c9df6e925b1cb099c29bd78788b2984cca (patch)
treebb816baca231de9b1d86bac53c8299a1cab63aa8 /apt-pkg
parente9a1e5f9a37b8ddcdb98f2a0608f262e0863673a (diff)
HashSumValue::Set: Do not provide const char* overload
Hide the std::string overload instead of providing a const char * one, the old variant was stupid. Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/hashsum_template.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index 42248f6ac..4000f230d 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -79,18 +79,15 @@ class HashSumValue
return Value();
}
- bool Set(std::string Str)
- {
- return Hex2Num(Str,Sum,sizeof(Sum));
- }
#ifdef APT_PKG_EXPOSE_STRING_VIEW
APT_HIDDEN bool Set(APT::StringView Str)
{
return Hex2Num(Str,Sum,sizeof(Sum));
}
- APT_HIDDEN bool Set(const char *Str)
+#else
+ bool Set(std::string Str)
{
- return Hex2Num(APT::StringView(Str),Sum,sizeof(Sum));
+ return Hex2Num(Str,Sum,sizeof(Sum));
}
#endif
inline void Set(unsigned char S[N/8])