]> git.lyx.org Git - lyx.git/blob - src/support/LAssert.h
Fix the line-delete-forward bug?
[lyx.git] / src / support / LAssert.h
1 // -*- C++ -*-
2 #ifndef LASSERT_H
3 #define LASSERT_H
4
5 #include "support/lyxlib.h"
6
7 //namespace LyX {
8
9 #ifdef ENABLE_ASSERTIONS
10
11 template<class A>
12 inline
13 void Assert(A assertion)
14 {
15         if (!assertion) {
16                 lyx::abort();
17         }
18 }
19
20 #else
21
22 template<class A>
23 inline
24 void Assert(A /*assertion*/) {}
25
26 #endif /* ENABLE_ASSERTIONS */
27
28 //} // end of namespace LyX
29 #endif /* LASSERT_H */
30