From a162f4e8258ce1d401bc1cdb018e1212db80772d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 21 May 2020 05:43:22 +0100 Subject: refactor(3p/nix/libexpr): Use std::string as qualified type 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* --- third_party/nix/src/libexpr/nixexpr.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'third_party/nix/src/libexpr/nixexpr.hh') 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 #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 }; -- cgit 1.4.1