about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/store-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/store-api.cc')
-rw-r--r--third_party/nix/src/libstore/store-api.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/store-api.cc b/third_party/nix/src/libstore/store-api.cc
index 4f4083f64f..dba9c8f95e 100644
--- a/third_party/nix/src/libstore/store-api.cc
+++ b/third_party/nix/src/libstore/store-api.cc
@@ -304,8 +304,8 @@ Path Store::makeFixedOutputPath(bool recursive, const Hash& hash,
                    "output:out",
                    hashString(
                        htSHA256,
-                       "fixed:out:" + (recursive ? (std::string) "r:" : "") +
-                           hash.to_string(Base16) + ":"),
+                       absl::StrCat("fixed:out:", (recursive ? "r:" : ""),
+                                    hash.to_string(Base16), ":")),
                    name);
 }
 
@@ -926,7 +926,7 @@ Strings ValidPathInfo::shortRefs() const {
 }
 
 std::string makeFixedOutputCA(bool recursive, const Hash& hash) {
-  return "fixed:" + (recursive ? (std::string) "r:" : "") + hash.to_string();
+  return "fixed:" + (recursive ? std::string("r:") : "") + hash.to_string();
 }
 
 void Store::addToStore(const ValidPathInfo& info, Source& narSource,