summaryrefslogtreecommitdiffstats
path: root/include/astra/Singleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/astra/Singleton.h')
-rw-r--r--include/astra/Singleton.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/astra/Singleton.h b/include/astra/Singleton.h
index 9d3c088..b823c0f 100644
--- a/include/astra/Singleton.h
+++ b/include/astra/Singleton.h
@@ -1,10 +1,10 @@
/*
-----------------------------------------------------------------------
-Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
- 2014-2015, CWI, Amsterdam
+Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+ 2014-2016, CWI, Amsterdam
Contact: astra@uantwerpen.be
-Website: http://sf.net/projects/astra-toolbox
+Website: http://www.astra-toolbox.com/
This file is part of the ASTRA Toolbox.
@@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License
along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
-$Id$
*/
#ifndef _INC_ASTRA_SINGLETON
@@ -82,15 +81,15 @@ class Singleton {
// libastra. This situation would cause issues when .mex files are unloaded.
#define DEFINE_SINGLETON(T) \
-template<> void Singleton<T >::construct() { assert(!m_singleton); m_singleton = new T(); } \
-template<> T* Singleton<T >::m_singleton = 0
+template<> T* Singleton<T >::m_singleton = 0; \
+template<> void Singleton<T >::construct() { assert(!m_singleton); m_singleton = new T(); }
// This is a hack to support statements like
// DEFINE_SINGLETON2(CTemplatedClass<C1, C2>);
#define DEFINE_SINGLETON2(A,B) \
-template<> void Singleton<A,B >::construct() { assert(!m_singleton); m_singleton = new A,B(); } \
-template<> A,B* Singleton<A,B >::m_singleton = 0
+template<> A,B* Singleton<A,B >::m_singleton = 0; \
+template<> void Singleton<A,B >::construct() { assert(!m_singleton); m_singleton = new A,B(); }
} // end namespace