mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
move assert function to a separate file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24318 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2fd9be2143
commit
2c73b5af3c
@ -42,6 +42,7 @@ liblyxsupport_la_SOURCES = \
|
||||
FileMonitor.cpp \
|
||||
RandomAccessList.h \
|
||||
assert.h \
|
||||
assert.cpp \
|
||||
convert.cpp \
|
||||
convert.h \
|
||||
copied_ptr.h \
|
||||
|
26
src/support/assert.cpp
Normal file
26
src/support/assert.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* \file assert.cpp
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author André Pönitz
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "support/debug.h"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace lyx {
|
||||
|
||||
void doAssert(char const * expr, char const * file, long line)
|
||||
{
|
||||
LYXERR0("ASSERTION " << expr << " VIOLATED IN " << file << ":" << line);
|
||||
// comment this out if not needed
|
||||
BOOST_ASSERT(false);
|
||||
}
|
||||
|
||||
} // namespace lyx
|
@ -17,8 +17,6 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "support/FileName.h"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
@ -187,11 +185,4 @@ LyXErr & operator<<(LyXErr & l, ios_base &(*t)(ios_base &))
|
||||
// The global instance
|
||||
LyXErr lyxerr;
|
||||
|
||||
void doAssert(char const * expr, char const * file, long line)
|
||||
{
|
||||
LYXERR0("ASSERTION " << expr << " VIOLATED in " << file << ":" << line);
|
||||
// comment this out if not needed
|
||||
BOOST_ASSERT(false);
|
||||
}
|
||||
|
||||
} // namespace lyx
|
||||
|
Loading…
Reference in New Issue
Block a user