From 69de5b5a00abf131452a8d5153afd0df6e86ce6c Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Wed, 30 Sep 2009 21:08:55 +0200 Subject: cosmetic fix: removed warning about double ';' after command static xyz inside a anonymous namespace is not really needed, so i removed the namespace to get rid of the compiler warning. it's more convinient for the developer to put ';' after that REGISTER_COMMAND_PARSER --- src/FbTk/CommandParser.hh | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/FbTk/CommandParser.hh b/src/FbTk/CommandParser.hh index 3e40ed6..030b6e0 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 { -- cgit v0.11.2