diff options
author | chatty | 2000-11-28 14:19:33 +0000 |
---|---|---|
committer | chatty | 2000-11-28 14:19:33 +0000 |
commit | f498bba5c7191d62776a2ed91497afa611849030 (patch) | |
tree | c8df14c468c58f631dc14fdb856a4e9d9f481e64 /utils | |
parent | 74da2751f804bc667b3e03294e8afd6d27b94c3f (diff) | |
download | ivy-league-f498bba5c7191d62776a2ed91497afa611849030.zip ivy-league-f498bba5c7191d62776a2ed91497afa611849030.tar.gz ivy-league-f498bba5c7191d62776a2ed91497afa611849030.tar.bz2 ivy-league-f498bba5c7191d62776a2ed91497afa611849030.tar.xz |
Added test to avoid multiple initializations
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Initializer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/Initializer.h b/utils/Initializer.h index b4d772d..5ed3a59 100644 --- a/utils/Initializer.h +++ b/utils/Initializer.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1992 + * Copyright 1992-1996 * Centre d'Etudes de la Navigation Aerienne (CENA) * * Initializers for classes @@ -19,10 +19,12 @@ #include "cplus_bugs.h" #ifndef CPLUS_BUG19 + template <class CLASS> class CcuInitializerFor { public: -inline CcuInitializerFor () { CLASS::ClassInit (); } +inline CcuInitializerFor () { if (!CLASS::ClassInitialized) CLASS::ClassInit (); } }; + #endif #endif /* Initializer_H_ */ |