aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libexpr/symbol-table.hh8
-rw-r--r--src/libexpr/value.hh10
-rw-r--r--src/libstore/machines.hh14
-rw-r--r--src/libstore/names.hh6
-rw-r--r--src/libutil/types.hh13
5 files changed, 24 insertions, 27 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,
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<string> systemTypes;
- const string sshKey;
+ const std::string storeUri;
+ const std::vector<std::string> systemTypes;
+ const std::string sshKey;
const unsigned int maxJobs;
const unsigned int speedFactor;
- const std::set<string> supportedFeatures;
- const std::set<string> mandatoryFeatures;
+ const std::set<std::string> supportedFeatures;
+ const std::set<std::string> mandatoryFeatures;
const std::string sshPublicHostKey;
bool enabled = true;
- bool allSupported(const std::set<string> & features) const;
+ bool allSupported(const std::set<std::string> & features) const;
- bool mandatoryMet(const std::set<string> & features) const;
+ bool mandatoryMet(const std::set<std::string> & 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<string> Strings;
-typedef std::set<string> StringSet;
-typedef std::map<string, string> StringMap;
+typedef std::list<std::string> Strings;
+typedef std::set<std::string> StringSet;
+typedef std::map<std::string, std::string> StringMap;
/* Paths are just strings. */
-
-typedef string Path;
+typedef std::string Path;
typedef std::string_view PathView;
typedef std::list<Path> Paths;
typedef std::set<Path> PathSet;
-typedef std::vector<std::pair<string, string>> Headers;
+typedef std::vector<std::pair<std::string, std::string>> Headers;
/* Helper class to run code at startup. */
template<typename T>