forked from lix-project/lix
Write the implementation for parseNonSRIUnprefixed
This commit is contained in:
parent
ea48e3a5b5
commit
b6b10b1d4c
|
@ -173,6 +173,11 @@ Hash Hash::parseAny(std::string_view original, std::optional<HashType> optType)
|
||||||
return Hash(rest, hashType, isSRI);
|
return Hash(rest, hashType, isSRI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Hash Hash::parseNonSRIUnprefixed(std::string_view s, HashType type)
|
||||||
|
{
|
||||||
|
return Hash(s, type, false);
|
||||||
|
}
|
||||||
|
|
||||||
Hash::Hash(std::string_view rest, HashType type, bool isSRI)
|
Hash::Hash(std::string_view rest, HashType type, bool isSRI)
|
||||||
: Hash(type)
|
: Hash(type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@ struct Hash
|
||||||
// hash type must be part of string
|
// hash type must be part of string
|
||||||
static Hash parseAnyPrefixed(std::string_view s);
|
static Hash parseAnyPrefixed(std::string_view s);
|
||||||
// prefix parsed separately; non SRI hash
|
// prefix parsed separately; non SRI hash
|
||||||
static Hash parseAnyUnprefixed(std::string_view s, HashType type);
|
static Hash parseNonSRIUnprefixed(std::string_view s, HashType type);
|
||||||
|
|
||||||
static Hash parseSRI(std::string_view original);
|
static Hash parseSRI(std::string_view original);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue