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 symbols; - std::list store; + std::list 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, diff --git a/src/libstore/machines.hh b/src/libstore/machines.hh index 341d9bd97..834626de9 100644 --- a/src/libstore/machines.hh +++ b/src/libstore/machines.hh @@ -8,19 +8,19 @@ class Store; struct Machine { - const string storeUri; - const std::vector systemTypes; - const string sshKey; + const std::string storeUri; + const std::vector systemTypes; + const std::string sshKey; const unsigned int maxJobs; const unsigned int speedFactor; - const std::set supportedFeatures; - const std::set mandatoryFeatures; + const std::set supportedFeatures; + const std::set mandatoryFeatures; const std::string sshPublicHostKey; bool enabled = true; - bool allSupported(const std::set & features) const; + bool allSupported(const std::set & features) const; - bool mandatoryMet(const std::set & features) const; + bool mandatoryMet(const std::set & features) const; Machine(decltype(storeUri) storeUri, decltype(systemTypes) systemTypes, diff --git a/src/libstore/names.hh b/src/libstore/names.hh index ecbad10b3..3977fc6cc 100644 --- a/src/libstore/names.hh +++ b/src/libstore/names.hh @@ -10,9 +10,9 @@ struct Regex; struct DrvName { - string fullName; - string name; - string version; + std::string fullName; + std::string name; + std::string version; unsigned int hits; DrvName(); diff --git a/src/libutil/types.hh b/src/libutil/types.hh index a26c9a966..bea2673ca 100644 --- a/src/libutil/types.hh +++ b/src/libutil/types.hh @@ -11,20 +11,17 @@ namespace nix { -using std::string; - -typedef std::list Strings; -typedef std::set StringSet; -typedef std::map StringMap; +typedef std::list Strings; +typedef std::set StringSet; +typedef std::map StringMap; /* Paths are just strings. */ - -typedef string Path; +typedef std::string Path; typedef std::string_view PathView; typedef std::list Paths; typedef std::set PathSet; -typedef std::vector> Headers; +typedef std::vector> Headers; /* Helper class to run code at startup. */ template