diff options
Diffstat (limited to 'src/libcmd/legacy.hh')
-rw-r--r-- | src/libcmd/legacy.hh | 4 |
1 files changed, 2 insertions, 2 deletions
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; |