diff options
author | Vaci Koblizek <vaci.koblizek@auguration.com> | 2023-03-28 17:20:33 +0100 |
---|---|---|
committer | Vaci Koblizek <vaci.koblizek@auguration.com> | 2023-03-28 17:20:33 +0100 |
commit | 957f83207433fec3d9a9b464c6dad0488f3934c8 (patch) | |
tree | 5242272deffbfc5669233dd6669331e08c414c08 | |
parent | 56dc6ed8410510033b835d48b3bd22766e8349a0 (diff) |
Avoid a string copy during Hash::to_string
-rw-r--r-- | src/libutil/hash.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index d2fd0c15a..5a7be47b2 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -130,7 +130,7 @@ std::string Hash::to_string(Base base, bool includeType) const break; case Base64: case SRI: - s += base64Encode(std::string((const char *) hash, hashSize)); + s += base64Encode(std::string_view((const char *) hash, hashSize)); break; } return s; |