diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2019-02-04 19:50:16 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2019-06-11 14:45:55 +0200 |
commit | a6e86d51a0e32cdc91f2902b0d6b483af884dcca (patch) | |
tree | 528867efd4499d088a7204470b0ff10bdb87457f /apt-pkg/contrib/hashsum_template.h | |
parent | 93e0ba2bfde58e6c1fbad53614083be8754d7ee8 (diff) |
Make APT::StringView public
Diffstat (limited to 'apt-pkg/contrib/hashsum_template.h')
-rw-r--r-- | apt-pkg/contrib/hashsum_template.h | 15 |
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)); |