diff --git a/src/FbTk/CommandParser.hh b/src/FbTk/CommandParser.hh index 3e40ed6f..030b6e0f 100644 --- a/src/FbTk/CommandParser.hh +++ b/src/FbTk/CommandParser.hh @@ -33,9 +33,7 @@ namespace FbTk { // helper for registering a function to parse arguments #define REGISTER_COMMAND_PARSER(name, parser, type) \ - namespace { \ - static const bool p_register_command_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &parser); \ - } + static const bool p_register_command_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &parser) // include some basic Command creators template @@ -45,9 +43,7 @@ Command *CommandCreator(const string &name, const string &args, } #define REGISTER_COMMAND(name, classname, type) \ - namespace { \ - static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::CommandCreator); \ - } + static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::CommandCreator) template Command *CommandCreatorWithArgs(const string &name, const string &args, @@ -56,9 +52,7 @@ Command *CommandCreatorWithArgs(const string &name, const string &args, } #define REGISTER_COMMAND_WITH_ARGS(name, classname, type) \ - namespace { \ - static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::CommandCreatorWithArgs); \ - } + static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::CommandCreatorWithArgs) template Command *UntrustedCommandCreator(const string &name, const string &args, @@ -68,9 +62,7 @@ Command *UntrustedCommandCreator(const string &name, const string &args, } #define REGISTER_UNTRUSTED_COMMAND(name, classname, type) \ - namespace { \ - static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::UntrustedCommandCreator); \ - } + static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::UntrustedCommandCreator) template Command *UntrustedCommandCreatorWithArgs(const string &name, @@ -80,9 +72,7 @@ Command *UntrustedCommandCreatorWithArgs(const string &name, } #define REGISTER_UNTRUSTED_COMMAND_WITH_ARGS(name, classname, type) \ - namespace { \ - static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::UntrustedCommandCreatorWithArgs); \ - } + static const bool p_register_##type_##name = FbTk::CommandParser::instance().registerCommand(#name, &FbTk::UntrustedCommandCreatorWithArgs) template class CommandParser {