make _GLIBCXX_DEBUG_PEDASSERT happy

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25295 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2008-06-17 16:33:19 +00:00
parent 61aa683425
commit 5dd5d98473

View File

@ -31,12 +31,13 @@ namespace lyx {
docstring const from_ascii(char const * ascii)
{
docstring s;
int n = strlen(ascii);
s.resize(n);
char_type *d = &s[0];
while (--n >= 0) {
d[n] = ascii[n];
LASSERT(static_cast<unsigned char>(ascii[n]) < 0x80, /**/);
if (int n = strlen(ascii)) {
s.resize(n);
char_type *d = &s[0];
while (--n >= 0) {
d[n] = ascii[n];
LASSERT(static_cast<unsigned char>(ascii[n]) < 0x80, /**/);
}
}
return s;
}