aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/binary-cache-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-17 22:20:05 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-01-18 11:12:30 +0100
commitd62a9390fcdc0f9e4971e5fab2f667567237b252 (patch)
treecdbf6aef8b15b2ba5f02f7426ec2e5cd1f595e39 /src/libstore/binary-cache-store.hh
parent52ee7ec0028263f04e15c05256ca90fa62a0da66 (diff)
Get rid of std::shared_ptr<std::string> and ref<std::string>
These were needed back in the pre-C++11 era because we didn't have move semantics. But now we do.
Diffstat (limited to 'src/libstore/binary-cache-store.hh')
-rw-r--r--src/libstore/binary-cache-store.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/binary-cache-store.hh
index 9815af591..46ff67c77 100644
--- a/src/libstore/binary-cache-store.hh
+++ b/src/libstore/binary-cache-store.hh
@@ -62,10 +62,11 @@ public:
/* Fetch the specified file and call the specified callback with
the result. A subclass may implement this asynchronously. */
- virtual void getFile(const std::string & path,
- Callback<std::shared_ptr<std::string>> callback) noexcept;
+ virtual void getFile(
+ const std::string & path,
+ Callback<std::optional<std::string>> callback) noexcept;
- std::shared_ptr<std::string> getFile(const std::string & path);
+ std::optional<std::string> getFile(const std::string & path);
public:
@@ -117,7 +118,7 @@ public:
void addSignatures(const StorePath & storePath, const StringSet & sigs) override;
- std::shared_ptr<std::string> getBuildLog(const StorePath & path) override;
+ std::optional<std::string> getBuildLog(const StorePath & path) override;
};