diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-21T04·43+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-21T04·43+0100 |
commit | a162f4e8258ce1d401bc1cdb018e1212db80772d (patch) | |
tree | cf78df573c740ec054aea483101be29e5fa06e8c /third_party/nix/src/libexpr/nixexpr.hh | |
parent | b97307056da53f094ab46e12f87d6a3f0a2be79f (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/nixexpr.hh')
-rw-r--r-- | third_party/nix/src/libexpr/nixexpr.hh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/third_party/nix/src/libexpr/nixexpr.hh b/third_party/nix/src/libexpr/nixexpr.hh index 8817e745b199..715dbd8d59f1 100644 --- a/third_party/nix/src/libexpr/nixexpr.hh +++ b/third_party/nix/src/libexpr/nixexpr.hh @@ -3,6 +3,7 @@ #include <map> #include "symbol-table.hh" +#include "types.hh" // TODO(tazjin): audit this include #include "value.hh" namespace nix { @@ -111,14 +112,14 @@ struct ExprString : Expr { /* Temporary class used during parsing of indented strings. */ struct ExprIndStr : Expr { - string s; - ExprIndStr(const string& s) : s(s){}; + std::string s; + ExprIndStr(const std::string& s) : s(s){}; }; struct ExprPath : Expr { - string s; + std::string s; Value v; - ExprPath(const string& s) : s(s) { mkPathNoCopy(v, this->s.c_str()); }; + ExprPath(const std::string& s) : s(s) { mkPathNoCopy(v, this->s.c_str()); }; COMMON_METHODS Value* maybeThunk(EvalState& state, Env& env); }; @@ -231,7 +232,7 @@ struct ExprLambda : Expr { pos); }; void setName(Symbol& name); - string showNamePos() const; + std::string showNamePos() const; COMMON_METHODS }; |