]> git.lyx.org Git - lyx.git/blobdiff - src/support/LAssert.h
some new (not extensive) changes, some fixes, will probably reverto to .la libs later...
[lyx.git] / src / support / LAssert.h
index dbe9de24fed04e9e576d8fd0d398750507af8cff..20be3713c55e4e12b6870a0b1dcbc2ff7c5ee995 100644 (file)
@@ -1,11 +1,11 @@
 // -*- C++ -*-
-#ifndef _LASSERT_H_
-#define _LASSERT_H_
+#ifndef LASSERT_H
+#define LASSERT_H
 
 //namespace LyX {
 
-#define HAVE_TEMPLATE
-#ifdef HAVE_TEMPLATE
+#ifdef ENABLE_ASSERTIONS
+
 //template<class X, class A> inline void Assert(A assertion)
 template<class A> inline void Assert(A assertion)
 {
@@ -23,7 +23,7 @@ template<class A> inline void Assert(A * ptr)
                abort();
        }
 }
-#endif
+#endif /* HAVE_PARTIAL_SPECIALIZATION  */ 
 
 //template<class A, class E> inline void Assert(A assertion, E except)
 //{
@@ -32,12 +32,13 @@ template<class A> inline void Assert(A * ptr)
 
 #else
 
-inline void lyx_assert(...)
-{
-       // nothing
-}
+template<class A> inline void Assert(A /*assertion*/) {}
+
+#endif /* ENABLE_ASSERTIONS */
 
-#endif
-#endif
 
 //} // end of namespace LyX
+
+
+#endif /* LASSERT_H */
+