Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 8, 2011, 6:53:39 PM (13 years ago)
Author:
rgrieder
Message:

Added preprocessor macro UNIQUE_NUMBER which will return a new integer number every time is invoked if such a mechanism is available.
On GCC < 4.3, it will be defined as LINE. Newer GCC and MSVC support COUNTER, which is then used.
Also replaced uses of LINE with UNIQUE_NUMBER if appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/Game.h

    r7401 r8418  
    5959*/
    6060#define DeclareGameState(className, stateName, bIgnoreTickTime, bGraphicsMode) \
    61     static bool BOOST_PP_CAT(bGameStateDummy_##className, __LINE__) = orxonox::Game::declareGameState<className>(#className, stateName, bIgnoreTickTime, bGraphicsMode)
     61    static bool BOOST_PP_CAT(bGameStateDummy_##className, __UNIQUE_NUMBER__) = orxonox::Game::declareGameState<className>(#className, stateName, bIgnoreTickTime, bGraphicsMode)
    6262// tolua_begin
    6363namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.