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/value.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'third_party/nix/src/libexpr/value.hh') diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh index 1f41cf04bb30..892c11220e42 100644 --- a/third_party/nix/src/libexpr/value.hh +++ b/third_party/nix/src/libexpr/value.hh @@ -1,6 +1,7 @@ #pragma once #include "symbol-table.hh" +#include "types.hh" #if HAVE_BOEHMGC #include @@ -56,10 +57,10 @@ class ExternalValueBase { public: /* Return a simple string describing the type */ - virtual string showType() const = 0; + virtual std::string showType() const = 0; /* Return a string to be used in builtins.typeOf */ - virtual string typeOf() const = 0; + virtual std::string typeOf() const = 0; /* How much space does this value take up */ virtual size_t valueSize(std::set& seen) const = 0; @@ -67,8 +68,8 @@ class ExternalValueBase { /* Coerce the value to a string. Defaults to uncoercable, i.e. throws an * error */ - virtual string coerceToString(const Pos& pos, PathSet& context, bool copyMore, - bool copyToStore) const; + virtual std::string coerceToString(const Pos& pos, PathSet& context, + bool copyMore, bool copyToStore) const; /* Compare to another value of the same type. Defaults to uncomparable, * i.e. always false. @@ -225,7 +226,7 @@ static inline void mkStringNoCopy(Value& v, const char* s) { } static inline void mkString(Value& v, const Symbol& s) { - mkStringNoCopy(v, ((const string&)s).c_str()); + mkStringNoCopy(v, ((const std::string&)s).c_str()); } void mkString(Value& v, const char* s); -- cgit 1.4.1