about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-24T21·29+0100
committerVincent Ambo <tazjin@google.com>2020-05-24T21·29+0100
commit838f86b0fd880b26539664140f04e5d16669dad8 (patch)
treec8fee2f0c136fbe5bb0735604e2f04d5b02698ba /third_party/nix/src/libstore/remote-store.cc
parentf30b2e610d9e612504a9f6460e0cc83413b80aeb (diff)
style(3p/nix): Remove 'using std::*' from types.hh r/840
It is considered bad form to use things from includes in headers, as
these directives propagate to everywhere else and can make it
confusing.

types.hh (which is includes almost literally everywhere) had some of
these directives, which this commit removes.
Diffstat (limited to 'third_party/nix/src/libstore/remote-store.cc')
-rw-r--r--third_party/nix/src/libstore/remote-store.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc
index cc6f6ebae9..c5d1dac6cb 100644
--- a/third_party/nix/src/libstore/remote-store.cc
+++ b/third_party/nix/src/libstore/remote-store.cc
@@ -102,7 +102,7 @@ ref<RemoteStore::Connection> UDSRemoteStore::openConnection() {
   }
   closeOnExec(conn->fd.get());
 
-  string socketPath = path ? *path : settings.nixDaemonSocketFile;
+  std::string socketPath = path ? *path : settings.nixDaemonSocketFile;
 
   struct sockaddr_un addr;
   addr.sun_family = AF_UNIX;
@@ -412,7 +412,7 @@ PathSet RemoteStore::queryDerivationOutputNames(const Path& path) {
   return readStrings<PathSet>(conn->from);
 }
 
-Path RemoteStore::queryPathFromHashPart(const string& hashPart) {
+Path RemoteStore::queryPathFromHashPart(const std::string& hashPart) {
   auto conn(getConnection());
   conn->to << wopQueryPathFromHashPart << hashPart;
   conn.processStderr();
@@ -460,7 +460,7 @@ void RemoteStore::addToStore(const ValidPathInfo& info, Source& source,
   }
 }
 
-Path RemoteStore::addToStore(const string& name, const Path& _srcPath,
+Path RemoteStore::addToStore(const std::string& name, const Path& _srcPath,
                              bool recursive, HashType hashAlgo,
                              PathFilter& filter, RepairFlag repair) {
   if (repair != 0u) {
@@ -503,7 +503,7 @@ Path RemoteStore::addToStore(const string& name, const Path& _srcPath,
   return readStorePath(*this, conn->from);
 }
 
-Path RemoteStore::addTextToStore(const string& name, const string& s,
+Path RemoteStore::addTextToStore(const std::string& name, const std::string& s,
                                  const PathSet& references, RepairFlag repair) {
   if (repair != 0u) {
     throw Error(
@@ -537,7 +537,7 @@ void RemoteStore::buildPaths(const PathSet& drvPaths, BuildMode buildMode) {
        identifiers. */
     PathSet drvPaths2;
     for (auto& i : drvPaths) {
-      drvPaths2.insert(string(i, 0, i.find('!')));
+      drvPaths2.insert(std::string(i, 0, i.find('!')));
     }
     conn->to << drvPaths2;
   }
@@ -692,7 +692,7 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink* sink,
     auto msg = readNum<uint64_t>(from);
 
     if (msg == STDERR_WRITE) {
-      string s = readString(from);
+      std::string s = readString(from);
       if (sink == nullptr) {
         throw Error("no sink");
       }
@@ -710,7 +710,7 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink* sink,
     }
 
     else if (msg == STDERR_ERROR) {
-      string error = readString(from);
+      std::string error = readString(from);
       unsigned int status = readInt(from);
       return std::make_exception_ptr(Error(status, error));
     }