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/OrxonoxConfig.h.in

    r8409 r8418  
    109109#endif
    110110
     111#ifndef __UNIQUE_NUMBER__
     112#  if defined(ORXONOX_COMPILER_GCC) && ORXONOX_COMP_VER >= 430
     113#    define __UNIQUE_NUMBER__ __COUNTER__
     114#  elif defined(ORXONOX_COMPILER_MSVC)
     115#    define __UNIQUE_NUMBER__ __COUNTER__
     116#  else
     117#    define __UNIQUE_NUMBER__ __LINE__
     118#  endif
     119#endif
    111120
    112121/*---------------------------------
Note: See TracChangeset for help on using the changeset viewer.