A std::count fix that got away!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3342 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-01-11 18:07:18 +00:00
parent 44806c63f9
commit 92b94e2ed3

View File

@ -119,8 +119,13 @@ bool FormMathsMatrix::input(FL_OBJECT * ob, long)
int FormMathsMatrix::AlignFilter(char const * cur, int c)
{
size_t len = strlen(cur);
// Use the HP version of std::count because the other one is broken on
// some systems
int counted;
std::count(cur, cur+len, '|', counted);
int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5) -
int(len) + std::count(cur, cur+len, '|');
int(len) + counted;
if (n < 0)
return FL_INVALID;