Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 11:22:36 AM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 6430-6440 from the gamestate branch to the trunk.
This adds keybindings merging functionality.

(from log of r6437)
When running development builds, the keybinder will merge the local file and the one from the data folder.
Catch: if you want to remove a binding, you'll have to write "NoBinding" (not case sensitive) to override the default command

The keybind command already does that for you though.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/util/Singleton.h

    r6417 r6536  
    5151        static T& getInstance()
    5252        {
    53             assert(T::singletonPtr_s != 0);
     53            assert(T::singletonPtr_s != NULL);
    5454            return *T::singletonPtr_s;
     55        }
     56
     57        //! Tells whether the singleton has been created
     58        static bool exists()
     59        {
     60            return (T::singletonPtr_s != NULL);
    5561        }
    5662
     
    6874        Singleton()
    6975        {
    70             assert(T::singletonPtr_s == 0);
     76            assert(T::singletonPtr_s == NULL);
    7177            T::singletonPtr_s = static_cast<T*>(this);
    7278        }
     
    7581        ~Singleton()
    7682        {
    77             assert(T::singletonPtr_s != 0);
    78             T::singletonPtr_s = 0;
     83            assert(T::singletonPtr_s != NULL);
     84            T::singletonPtr_s = NULL;
    7985        }
    8086
Note: See TracChangeset for help on using the changeset viewer.