diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-21 16:37:25 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-21 16:37:25 +0100 |
commit | 36c7b12f3354606a50808197f6695c185fd02893 (patch) | |
tree | fbd1e816de491509af74ce21eed1ae1923e8acb9 /src/libexpr | |
parent | 1ac2664472d0135503e54f0d924a802023855003 (diff) |
Remove std::string alias
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/symbol-table.hh | 8 | ||||
-rw-r--r-- | src/libexpr/value.hh | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libexpr/symbol-table.hh b/src/libexpr/symbol-table.hh index a090ebae5..48d20c29d 100644 --- a/src/libexpr/symbol-table.hh +++ b/src/libexpr/symbol-table.hh @@ -17,8 +17,8 @@ namespace nix { class Symbol { private: - const string * s; // pointer into SymbolTable - Symbol(const string * s) : s(s) { }; + const std::string * s; // pointer into SymbolTable + Symbol(const std::string * s) : s(s) { }; friend class SymbolTable; public: @@ -72,7 +72,7 @@ class SymbolTable { private: std::unordered_map<std::string_view, Symbol> symbols; - std::list<string> store; + std::list<std::string> store; public: Symbol create(std::string_view s) @@ -84,7 +84,7 @@ public: auto it = symbols.find(s); if (it != symbols.end()) return it->second; - const string & rawSym = store.emplace_back(s); + auto & rawSym = store.emplace_back(s); return symbols.emplace(rawSym, Symbol(&rawSym)).first->second; } diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index bef5cd6bd..3fdff71a5 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/value.hh @@ -77,20 +77,20 @@ 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; /* Coerce the value to a string. Defaults to uncoercable, i.e. throws an - * error + * 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. */ - virtual bool operator==(const ExternalValueBase & b) const; + virtual bool operator ==(const ExternalValueBase & b) const; /* Print the value as JSON. Defaults to unconvertable, i.e. throws an error */ virtual void printValueAsJSON(EvalState & state, bool strict, |