Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3169 for code/branches


Ignore:
Timestamp:
Jun 14, 2009, 6:35:31 PM (15 years ago)
Author:
rgrieder
Message:

Replacing MACRO_CONCATENATE and MACRO_QUOTEME with the more robust boost versions.

Location:
code/branches/pch/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/OrxonoxConfig.h.in

    r3167 r3169  
    140140 * Apple Settings
    141141 *-------------------------------*/
    142 
    143 
    144 /*---------------------------------
    145  * Special Macros
    146  *-------------------------------*/
    147 #define MACRO_CONCATENATE_AUX(a, b) a##b
    148 #define MACRO_CONCATENATE(a, b) MACRO_CONCATENATE_AUX(a, b)
    149 #define MACRO_QUOTEME_AUX(x) #x
    150 #define MACRO_QUOTEME(x) MACRO_QUOTEME_AUX(x)
    151142
    152143
  • code/branches/pch/src/SpecialConfig.h.in

    r3167 r3169  
    4141
    4242#include "OrxonoxConfig.h"
     43#include <boost/preprocessor/stringize.hpp>
    4344
    4445/**
     
    8182    const char ORXONOX_MEDIA_DEV_PATH[]       = "@CMAKE_MEDIA_OUTPUT_DIRECTORY@";
    8283#ifdef CMAKE_CONFIGURATION_TYPES
    83     const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" MACRO_QUOTEME(CMAKE_BUILD_TYPE);
    84     const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@/"    MACRO_QUOTEME(CMAKE_BUILD_TYPE);
     84    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
     85    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@/"    BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
    8586#else
    8687    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@";
  • code/branches/pch/src/core/Game.h

    r3159 r3169  
    4444#include <vector>
    4545#include <boost/shared_ptr.hpp>
     46#include <boost/preprocessor/cat.hpp>
    4647
    4748#include "OrxonoxClass.h"
     
    5354*/
    5455#define AddGameState(classname, ...) \
    55     static bool MACRO_CONCATENATE(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
     56    static bool BOOST_PP_CAT(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
    5657
    5758// tolua_begin
  • code/branches/pch/src/network/NetworkFunction.h

    r3154 r3169  
    3636#include <map>
    3737#include <cassert>
     38#include <boost/preprocessor/cat.hpp>
    3839#include "util/MultiType.h"
    3940#include "core/Functor.h"
     
    215216
    216217#define registerStaticNetworkFunction( functionPointer ) \
    217   static void* MACRO_CONCATENATE( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
     218  static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
    218219#define registerMemberNetworkFunction( class, function ) \
    219   static void* MACRO_CONCATENATE( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
     220  static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
    220221  // call it with functionPointer, clientID, args
    221222#define callStaticNetworkFunction( functionPointer, ...) \
Note: See TracChangeset for help on using the changeset viewer.