From: Michael Schmitt Date: Fri, 10 Nov 2006 21:38:07 +0000 (+0000) Subject: * lyx_main.C: remove duplicate function assertion_failed X-Git-Tag: 1.6.10~11946 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3815df7705b09920f9bb60c6fd9ee0576fe0a834;hp=ec15dfd2a3049bbabcaf7d41de5709a5faf41cc0;p=lyx.git * lyx_main.C: remove duplicate function assertion_failed * boost.C: fix namespace problem regarding assertion_failed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15844 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/boost.C b/src/boost.C index b335e31c71..ff420ec555 100644 --- a/src/boost.C +++ b/src/boost.C @@ -18,10 +18,9 @@ #include - -namespace lyx { - using std::endl; +using lyx::lyxerr; +using lyx::LyX; namespace boost { @@ -34,7 +33,6 @@ void throw_exception(std::exception const & e) } #endif -namespace { void emergencyCleanup() { @@ -47,8 +45,6 @@ void emergencyCleanup() LyX::cref().emergencyCleanup(); } -} - void assertion_failed(char const * expr, char const * function, char const * file, long line) @@ -57,11 +53,7 @@ void assertion_failed(char const * expr, char const * function, << " by failing check \"" << expr << "\"" << " in file " << file << ":" << line << endl; emergencyCleanup(); - support::abort(); + lyx::support::abort(); } - -} - - -} // namespace lyx +} // namespace boost diff --git a/src/lyx_main.C b/src/lyx_main.C index fce2656ba5..cc856fb70a 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -1306,15 +1306,3 @@ kb_keymap & theTopLevelKeymap() } } // namespace lyx - - -namespace boost { - -void assertion_failed(char const* a, char const* b, char const* c, long d) -{ - lyx::lyxerr << "Assertion failed: " << a << ' ' << b << ' ' << c << ' ' - << d << '\n'; -} - -} // boost -