aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/content-address.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 05:16:42 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 05:16:42 +0100
commit8abb20390ef2f8ae664c0ac34479b2a43aa1df26 (patch)
treef56c81ea799d3d543748b8deec5892f3aed8992b /src/libstore/content-address.cc
parentea10088703d1d7f83c27e4ff14ae98543f7fc47d (diff)
Merge pull request #9229 from tfc/small-improvements
Remove warnings, small improvements (cherry picked from commit 5ac87a75dd65c19c50976559a6f7810c315cd9d5) Change-Id: I88349b6e954398dde83c845f42d41a9dd89ba9e0
Diffstat (limited to 'src/libstore/content-address.cc')
-rw-r--r--src/libstore/content-address.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc
index ae91b859b..77f23b0b3 100644
--- a/src/libstore/content-address.cc
+++ b/src/libstore/content-address.cc
@@ -29,12 +29,13 @@ std::string ContentAddressMethod::renderPrefix() const
ContentAddressMethod ContentAddressMethod::parsePrefix(std::string_view & m)
{
- ContentAddressMethod method = FileIngestionMethod::Flat;
- if (splitPrefix(m, "r:"))
- method = FileIngestionMethod::Recursive;
- else if (splitPrefix(m, "text:"))
- method = TextIngestionMethod {};
- return method;
+ if (splitPrefix(m, "r:")) {
+ return FileIngestionMethod::Recursive;
+ }
+ else if (splitPrefix(m, "text:")) {
+ return TextIngestionMethod {};
+ }
+ return FileIngestionMethod::Flat;
}
std::string ContentAddressMethod::render(HashType ht) const