about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/get-drvs.hh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-21T04·43+0100
committerVincent Ambo <tazjin@google.com>2020-05-21T04·43+0100
commita162f4e8258ce1d401bc1cdb018e1212db80772d (patch)
treecf78df573c740ec054aea483101be29e5fa06e8c /third_party/nix/src/libexpr/get-drvs.hh
parentb97307056da53f094ab46e12f87d6a3f0a2be79f (diff)
refactor(3p/nix/libexpr): Use std::string as qualified type r/797
Replaces most uses of `string` with `std::string`.

This came up because I removed the "types.hh" import from
"symbol-table.hh", which percolated through a bunch of files where
`string` was suddenly no longer defined ... *sigh*
Diffstat (limited to 'third_party/nix/src/libexpr/get-drvs.hh')
-rw-r--r--third_party/nix/src/libexpr/get-drvs.hh46
1 files changed, 23 insertions, 23 deletions
diff --git a/third_party/nix/src/libexpr/get-drvs.hh b/third_party/nix/src/libexpr/get-drvs.hh
index f0de0f67b8..3da2319461 100644
--- a/third_party/nix/src/libexpr/get-drvs.hh
+++ b/third_party/nix/src/libexpr/get-drvs.hh
@@ -14,11 +14,11 @@ struct DrvInfo {
  private:
   EvalState* state;
 
-  mutable string name;
-  mutable string system;
-  mutable string drvPath;
-  mutable string outPath;
-  mutable string outputName;
+  mutable std::string name;
+  mutable std::string system;
+  mutable std::string drvPath;
+  mutable std::string outPath;
+  mutable std::string outputName;
   Outputs outputs;
 
   bool failed = false;  // set if we get an AssertionError
@@ -30,38 +30,38 @@ struct DrvInfo {
   bool checkMeta(Value& v);
 
  public:
-  string attrPath; /* path towards the derivation */
+  std::string attrPath; /* path towards the derivation */
 
   DrvInfo(EvalState& state) : state(&state){};
-  DrvInfo(EvalState& state, string attrPath, Bindings* attrs);
+  DrvInfo(EvalState& state, std::string attrPath, Bindings* attrs);
   DrvInfo(EvalState& state, const ref<Store>& store,
           const std::string& drvPathWithOutputs);
 
-  string queryName() const;
-  string querySystem() const;
-  string queryDrvPath() const;
-  string queryOutPath() const;
-  string queryOutputName() const;
+  std::string queryName() const;
+  std::string querySystem() const;
+  std::string queryDrvPath() const;
+  std::string queryOutPath() const;
+  std::string queryOutputName() const;
   /** Return the list of outputs. The "outputs to install" are determined by
    * `meta.outputsToInstall`. */
   Outputs queryOutputs(bool onlyOutputsToInstall = false);
 
   StringSet queryMetaNames();
-  Value* queryMeta(const string& name);
-  string queryMetaString(const string& name);
-  NixInt queryMetaInt(const string& name, NixInt def);
-  NixFloat queryMetaFloat(const string& name, NixFloat def);
-  bool queryMetaBool(const string& name, bool def);
-  void setMeta(const string& name, Value* v);
+  Value* queryMeta(const std::string& name);
+  std::string queryMetaString(const std::string& name);
+  NixInt queryMetaInt(const std::string& name, NixInt def);
+  NixFloat queryMetaFloat(const std::string& name, NixFloat def);
+  bool queryMetaBool(const std::string& name, bool def);
+  void setMeta(const std::string& name, Value* v);
 
   /*
   MetaInfo queryMetaInfo(EvalState & state) const;
-  MetaValue queryMetaInfo(EvalState & state, const string & name) const;
+  MetaValue queryMetaInfo(EvalState & state, const std::string & name) const;
   */
 
-  void setName(const string& s) { name = s; }
-  void setDrvPath(const string& s) { drvPath = s; }
-  void setOutPath(const string& s) { outPath = s; }
+  void setName(const std::string& s) { name = s; }
+  void setDrvPath(const std::string& s) { drvPath = s; }
+  void setOutPath(const std::string& s) { outPath = s; }
 
   void setFailed() { failed = true; };
   bool hasFailed() { return failed; };
@@ -78,7 +78,7 @@ typedef list<DrvInfo> DrvInfos;
 std::optional<DrvInfo> getDerivation(EvalState& state, Value& v,
                                      bool ignoreAssertionFailures);
 
-void getDerivations(EvalState& state, Value& v, const string& pathPrefix,
+void getDerivations(EvalState& state, Value& v, const std::string& pathPrefix,
                     Bindings& autoArgs, DrvInfos& drvs,
                     bool ignoreAssertionFailures);