>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | I Lars> wonder why I did not fix these ones last time I compiled without Lars> | assertions... Anyway, here are a few files that require | Lars> #include <boost/current_function.hpp> >> Lars> | Lars, considering that this is (slightly) ugly, would you Lars> prefer a | patch that includes this header in debug.h Lars> (considering that these | names are only needed with lyxerr)? Lars> No, I think I prefere how you have done it here. OK, I committed the following patch, which also fix a warning about unused variables. JMarc
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2133 diff -u -p -r1.2133 ChangeLog --- src/ChangeLog 5 Mar 2005 10:59:28 -0000 1.2133 +++ src/ChangeLog 7 Mar 2005 11:01:54 -0000 @@ -1,3 +1,12 @@ +2005-03-07 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * lyxfunc.C (getStatus): fix warning when assertions are disabled + + * text3.C: + * lyxfunc.C: + * dociterator.C: include <boost/current_function.hpp>, which is + needed when assertions are disabled. + 2005-03-05 Johnathan Burchill <[EMAIL PROTECTED]> * text2.C: fix for stuck cursor when traversing two Index: src/dociterator.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/dociterator.C,v retrieving revision 1.25 diff -u -p -r1.25 dociterator.C --- src/dociterator.C 25 Feb 2005 11:55:31 -0000 1.25 +++ src/dociterator.C 7 Mar 2005 11:01:54 -0000 @@ -22,6 +22,7 @@ #include "mathed/math_inset.h" #include <boost/assert.hpp> +#include <boost/current_function.hpp> using std::endl; Index: src/lyxfunc.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v retrieving revision 1.648 diff -u -p -r1.648 lyxfunc.C --- src/lyxfunc.C 15 Feb 2005 17:34:54 -0000 1.648 +++ src/lyxfunc.C 7 Mar 2005 11:01:54 -0000 @@ -90,6 +90,7 @@ #include "support/convert.h" #include "support/os.h" +#include <boost/current_function.hpp> #include <boost/filesystem/operations.hpp> #include <sstream> @@ -156,17 +157,9 @@ bool getStatus(LCursor cursor, bool res = false; for ( ; cursor.depth(); cursor.pop()) { //lyxerr << "\nLCursor::getStatus: cmd: " << cmd << endl << *this << endl; - DocIterator::idx_type & idx = cursor.idx(); - DocIterator::idx_type const lastidx = cursor.lastidx(); - BOOST_ASSERT(idx <= lastidx); - - DocIterator::pit_type & pit = cursor.pit(); - DocIterator::pit_type const lastpit = cursor.lastpit(); - BOOST_ASSERT(pit <= lastpit); - - DocIterator::pos_type & pos = cursor.pos(); - DocIterator::pos_type const lastpos = cursor.lastpos(); - BOOST_ASSERT(pos <= lastpos); + BOOST_ASSERT(cursor.idx() <= cursor.lastidx()); + BOOST_ASSERT(cursor.pit() <= cursor.lastpit()); + BOOST_ASSERT(cursor.pos() <= cursor.lastpos()); // The inset's getStatus() will return 'true' if it made // a definitive decision on whether it want to handle the Index: src/text3.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v retrieving revision 1.285 diff -u -p -r1.285 text3.C --- src/text3.C 25 Feb 2005 11:55:36 -0000 1.285 +++ src/text3.C 7 Mar 2005 11:01:54 -0000 @@ -61,6 +61,8 @@ #include "mathed/math_hullinset.h" #include "mathed/math_macrotemplate.h" +#include <boost/current_function.hpp> + #include <clocale> #include <sstream>