summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashsum_template.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/hashsum_template.h')
-rw-r--r--apt-pkg/contrib/hashsum_template.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index f11fc2f1c..52b2cbab3 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -11,9 +11,7 @@
#include <cstring>
#include <string>
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
#include <apt-pkg/string_view.h>
-#endif
#include <apt-pkg/strutl.h>
@@ -77,17 +75,10 @@ class HashSumValue
return Value();
}
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
- APT_HIDDEN bool Set(APT::StringView Str)
- {
- return Hex2Num(Str,Sum,sizeof(Sum));
- }
-#else
- bool Set(std::string Str)
+ bool Set(APT::StringView Str)
{
return Hex2Num(Str,Sum,sizeof(Sum));
}
-#endif
inline void Set(unsigned char S[N/8])
{
for (int I = 0; I != sizeof(Sum); ++I)
@@ -99,8 +90,7 @@ class HashSumValue
memset(Sum,0,sizeof(Sum));
Set(Str);
}
-#ifdef APT_PKG_EXPOSE_STRING_VIEW
- APT_HIDDEN explicit HashSumValue(APT::StringView const &Str)
+ explicit HashSumValue(APT::StringView const &Str)
{
memset(Sum,0,sizeof(Sum));
Set(Str);
@@ -110,7 +100,6 @@ class HashSumValue
memset(Sum,0,sizeof(Sum));
Set(Str);
}
-#endif
HashSumValue()
{
memset(Sum,0,sizeof(Sum));