+2001-01-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * src/support/lyxstring.C (rfind): better fix (from Dekel).
+
+ * src/tabular.h: add a couple std:: qualifiers.
+
2001-01-10 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/lyxstring.C (rfind): also test the first char in the
#include "LAssert.h"
+#include "debug.h"
+
using std::min;
using std::istream;
using std::ostream;
{
TestlyxstringInvariant(this);
- size_type ii = min(rep->sz - 1, i);
- for (size_type t = ii; t >= 0; --t) {
- if (rep->s[t] == c) return t;
- }
- return npos;
+ size_type const sz = rep->sz;
+ if (sz < 1) return npos;
+ size_type ii = min(sz - 1, i);
+ do {
+ if (rep->s[ii] == c) return ii;
+ } while (ii-- > 0);
+ return npos;
}
typedef std::vector<columnstruct> column_vector;
///
- void ReadNew(Buffer const * buf, istream & is,
+ void ReadNew(Buffer const * buf, std::istream & is,
LyXLex & lex, string const & l);
///
- void ReadOld(Buffer const * buf, istream & is,
+ void ReadOld(Buffer const * buf, std::istream & is,
LyXLex & lex, string const & l);
///
int rows_;