diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/nix/src/nix-env/nix-env.cc | 10 | ||||
-rw-r--r-- | third_party/nix/src/nix/command.hh | 4 | ||||
-rw-r--r-- | third_party/nix/src/nix/legacy.hh | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/third_party/nix/src/nix-env/nix-env.cc b/third_party/nix/src/nix-env/nix-env.cc index 9c0931e7f4..830bd514da 100644 --- a/third_party/nix/src/nix-env/nix-env.cc +++ b/third_party/nix/src/nix-env/nix-env.cc @@ -32,14 +32,14 @@ using namespace nix; using std::cout; -typedef enum { +using InstallSourceType = enum { srcNixExprDrvs, srcNixExprs, srcStorePaths, srcProfile, srcAttrPath, srcUnknown -} InstallSourceType; +}; struct InstallSourceInfo { InstallSourceType type; @@ -229,7 +229,7 @@ static DrvInfos filterBySelector(EvalState& state, const DrvInfos& allElems, std::set<unsigned int> done; for (auto& i : selectors) { - typedef std::list<std::pair<DrvInfo, unsigned int> > Matches; + using Matches = std::list<std::pair<DrvInfo, unsigned int> >; Matches matches; unsigned int n = 0; for (auto j = allElems.begin(); j != allElems.end(); ++j, ++n) { @@ -249,7 +249,7 @@ static DrvInfos filterBySelector(EvalState& state, const DrvInfos& allElems, arbitrarily pick the first one. */ if (newestOnly) { /* Map from package names to derivations. */ - typedef std::map<std::string, std::pair<DrvInfo, unsigned int> > Newest; + using Newest = std::map<std::string, std::pair<DrvInfo, unsigned int> >; Newest newest; StringSet multiple; @@ -834,7 +834,7 @@ void printTable(Table& table) { least one element with a higher version in the set. `cvUnavail' means that there are no elements with the same name in the set. */ -typedef enum { cvLess, cvEqual, cvGreater, cvUnavail } VersionDiff; +using VersionDiff = enum { cvLess, cvEqual, cvGreater, cvUnavail }; static VersionDiff compareVersionAgainstSet(const DrvInfo& elem, const DrvInfos& elems, diff --git a/third_party/nix/src/nix/command.hh b/third_party/nix/src/nix/command.hh index 01c1ed69d6..87e2fbe9d2 100644 --- a/third_party/nix/src/nix/command.hh +++ b/third_party/nix/src/nix/command.hh @@ -51,7 +51,7 @@ struct Buildable { std::map<std::string, Path> outputs; }; -typedef std::vector<Buildable> Buildables; +using Buildables = std::vector<Buildable>; struct Installable { virtual std::string what() = 0; @@ -140,7 +140,7 @@ struct StorePathCommand : public InstallablesCommand { void run(ref<Store> store) override; }; -typedef std::map<std::string, ref<Command>> Commands; +using Commands = std::map<std::string, ref<Command>>; /* An argument parser that supports multiple subcommands, i.e. ‘<command> <subcommand>’. */ diff --git a/third_party/nix/src/nix/legacy.hh b/third_party/nix/src/nix/legacy.hh index a9bc65c02e..a0fc88da24 100644 --- a/third_party/nix/src/nix/legacy.hh +++ b/third_party/nix/src/nix/legacy.hh @@ -9,7 +9,7 @@ namespace nix { typedef std::function<void(int, char**)> MainFunction; struct RegisterLegacyCommand { - typedef std::map<std::string, MainFunction> Commands; + using Commands = std::map<std::string, MainFunction>; static Commands* commands; RegisterLegacyCommand(const std::string& name, MainFunction fun) { |