]> git.lyx.org Git - lyx.git/blob - src/support/LAssert.h
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / support / LAssert.h
1 // -*- C++ -*-
2 /**
3  * \file LAssert.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef LASSERT_H
13 #define LASSERT_H
14
15 namespace lyx {
16 namespace support {
17
18 #ifdef ENABLE_ASSERTIONS
19
20 /** Live assertion.
21     This is a debug tool to ensure that the assertion holds. If it don't hole
22     we run #emergencyCleanup()# and then #lyx::abort".
23     @param assertion this should evaluate to true unless you want an abort.
24 */
25 void Assert(bool assertion);
26
27 #else
28
29 /** Dummy assertion.
30     When compiling without assertions we use this no-op function.
31 */
32 inline
33 void Assert(bool /*assertion*/) {}
34
35 #endif /* ENABLE_ASSERTIONS */
36
37 } // namespace support
38 } // namespace lyx
39
40 #endif /* LASSERT_H */