aboutsummaryrefslogtreecommitdiff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r--src/nix/command.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index 2db22dba2..be56f8992 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -182,7 +182,7 @@ public:
std::shared_ptr<Command> command;
- MultiCommand(const Commands & commands);
+ MultiCommand(const std::vector<ref<Command>> & commands);
void printHelp(const string & programName, std::ostream & out) override;
@@ -194,12 +194,12 @@ public:
/* A helper class for registering commands globally. */
struct RegisterCommand
{
- static Commands * commands;
+ static std::vector<ref<Command>> * commands;
RegisterCommand(ref<Command> command)
{
- if (!commands) commands = new Commands;
- commands->emplace(command->name(), command);
+ if (!commands) commands = new std::vector<ref<Command>>;
+ commands->push_back(command);
}
};