return string_view from printHashType rather than string
This commit is contained in:
+1
-1
@@ -403,7 +403,7 @@ HashType parseHashType(std::string_view s)
|
||||
throw UsageError("unknown hash algorithm '%1%'", s);
|
||||
}
|
||||
|
||||
std::string printHashType(HashType ht)
|
||||
std::string_view printHashType(HashType ht)
|
||||
{
|
||||
switch (ht) {
|
||||
case htMD5: return "md5";
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ HashType parseHashType(std::string_view s);
|
||||
std::optional<HashType> parseHashTypeOpt(std::string_view s);
|
||||
|
||||
/* And the reverse. */
|
||||
std::string printHashType(HashType ht);
|
||||
std::string_view printHashType(HashType ht);
|
||||
|
||||
|
||||
union Ctx;
|
||||
|
||||
Reference in New Issue
Block a user