diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-25 16:00:00 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-25 16:13:02 +0100 |
commit | df552ff53e68dff8ca360adbdbea214ece1d08ee (patch) | |
tree | 9ed3cb700377d4731b4c234ebec16efb0099c71a /src/libstore/remote-store.cc | |
parent | 14b38d0887f8a8d6b75039113eface57cfb19d06 (diff) |
Remove std::string alias (for real this time)
Also use std::string_view in a few more places.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index c6f083dea..e7ffa6595 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -661,8 +661,11 @@ void RemoteStore::addMultipleToStore( } -StorePath RemoteStore::addTextToStore(const string & name, const string & s, - const StorePathSet & references, RepairFlag repair) +StorePath RemoteStore::addTextToStore( + std::string_view name, + std::string_view s, + const StorePathSet & references, + RepairFlag repair) { StringSource source(s); return addCAToStore(source, name, TextHashMethod{}, references, repair)->path; @@ -1000,7 +1003,7 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source * auto msg = readNum<uint64_t>(from); if (msg == STDERR_WRITE) { - string s = readString(from); + auto s = readString(from); if (!sink) throw Error("no sink"); (*sink)(s); } @@ -1017,7 +1020,7 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source * if (GET_PROTOCOL_MINOR(daemonVersion) >= 26) { return std::make_exception_ptr(readError(from)); } else { - string error = readString(from); + auto error = readString(from); unsigned int status = readInt(from); return std::make_exception_ptr(Error(status, error)); } |