[Orxonox-commit 1736] r6454 - in code/branches/consolecommands2/src/libraries: core util

rgrieder at orxonox.net rgrieder at orxonox.net
Fri Jan 22 14:51:06 CET 2010


Author: rgrieder
Date: 2010-01-22 14:51:06 +0100 (Fri, 22 Jan 2010)
New Revision: 6454

Modified:
   code/branches/consolecommands2/src/libraries/core/ConsoleCommand.cc
   code/branches/consolecommands2/src/libraries/core/ConsoleCommand.h
   code/branches/consolecommands2/src/libraries/util/VA_NARGS.h
Log:
3 build fixes for MSVC.

Modified: code/branches/consolecommands2/src/libraries/core/ConsoleCommand.cc
===================================================================
--- code/branches/consolecommands2/src/libraries/core/ConsoleCommand.cc	2010-01-20 13:28:48 UTC (rev 6453)
+++ code/branches/consolecommands2/src/libraries/core/ConsoleCommand.cc	2010-01-22 13:51:06 UTC (rev 6454)
@@ -77,7 +77,7 @@
 namespace orxonox
 {
     _SetConsoleCommand("BaseObject", "setName", &BaseObject::setName, (BaseObject*)0);
-    _ConsoleCommand::_ConsoleCommandManipulator test = _ModifyConsoleCommand("BaseObject", "setName").setFunction(&BaseObject::setActive);
+    _ConsoleCommand::_ConsoleCommandManipulator test(_ModifyConsoleCommand("BaseObject", "setName").setFunction(&BaseObject::setActive));
 
     _ConsoleCommand::_ConsoleCommand(const std::string& group, const std::string& name, Functor* functor, State::Enum state) : Executor(functor, name), functionHeader_(functor->getHeaderIdentifier())
     {

Modified: code/branches/consolecommands2/src/libraries/core/ConsoleCommand.h
===================================================================
--- code/branches/consolecommands2/src/libraries/core/ConsoleCommand.h	2010-01-20 13:28:48 UTC (rev 6453)
+++ code/branches/consolecommands2/src/libraries/core/ConsoleCommand.h	2010-01-22 13:51:06 UTC (rev 6454)
@@ -32,6 +32,7 @@
 #include "CorePrereqs.h"
 
 #include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/facilities/expand.hpp>
 
 #include "util/VA_NARGS.h"
 #include "ArgumentCompletionFunctions.h"
@@ -157,7 +158,7 @@
 
 
 #define _SetConsoleCommand(...) \
-    BOOST_PP_CAT(_SetConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__)
+    BOOST_PP_EXPAND(BOOST_PP_CAT(_SetConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
 #define _SetConsoleCommand2(name, functionpointer) \
     _SetConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer))
 #define _SetConsoleCommand3(group, name, functionpointer) \

Modified: code/branches/consolecommands2/src/libraries/util/VA_NARGS.h
===================================================================
--- code/branches/consolecommands2/src/libraries/util/VA_NARGS.h	2010-01-20 13:28:48 UTC (rev 6453)
+++ code/branches/consolecommands2/src/libraries/util/VA_NARGS.h	2010-01-22 13:51:06 UTC (rev 6454)
@@ -31,6 +31,8 @@
     @brief Declaration of the ORXONOX_VA_NARGS macro which returns the number of arguments passed to a variadic macro.
 */
 
+#include <boost/preprocessor/facilities/expand.hpp>
+
 /**
     @brief Returns the number of arguments passed to a variadic macro. Important: The number of arguments must be greater than zero (ORXONOX_VA_NARGS() returns 1).
 */
@@ -41,7 +43,7 @@
 // some helper macros //
 
 #define ORXONOX_VA_NARGS_CONCAT(...) \
-    ORXONOX_VA_NARGS_INTERN(__VA_ARGS__)
+    BOOST_PP_EXPAND(ORXONOX_VA_NARGS_INTERN(__VA_ARGS__))
 
 #define ORXONOX_VA_NARGS_INTERN( \
     arg1,  arg2,  arg3,  arg4,  arg5,  arg6,  arg7,  arg8,  arg9,  arg10, \




More information about the Orxonox-commit mailing list