diff options
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/legacy.cc | 2 | ||||
-rw-r--r-- | src/libcmd/legacy.hh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libcmd/legacy.cc b/src/libcmd/legacy.cc index 6df09ee37..8bbe9b031 100644 --- a/src/libcmd/legacy.cc +++ b/src/libcmd/legacy.cc @@ -2,6 +2,6 @@ namespace nix { -RegisterLegacyCommand::Commands * RegisterLegacyCommand::commands = 0; +LegacyCommands::Commands * LegacyCommands::commands = 0; } diff --git a/src/libcmd/legacy.hh b/src/libcmd/legacy.hh index 357500a4d..45a231983 100644 --- a/src/libcmd/legacy.hh +++ b/src/libcmd/legacy.hh @@ -9,12 +9,12 @@ namespace nix { typedef std::function<void(int, char * *)> MainFunction; -struct RegisterLegacyCommand +struct LegacyCommands { typedef std::map<std::string, MainFunction> Commands; static Commands * commands; - RegisterLegacyCommand(const std::string & name, MainFunction fun) + static void add(const std::string & name, MainFunction fun) { if (!commands) commands = new Commands; (*commands)[name] = fun; |