remove size_t/int warning: QString doesn't use size_t so we must cast it to avoid the warning

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16117 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2006-11-29 22:57:34 +00:00
parent a73732e0ec
commit f4c32de361
2 changed files with 6 additions and 5 deletions

View File

@ -113,9 +113,9 @@ void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
void ucs4_to_qstring(lyx::docstring const & str, QString & s)
{
size_t const ls = str.size();
s.resize(ls);
for (int i = ls; --i >= 0; )
int i = static_cast<int>(str.size());
s.resize(i);
for (i; --i >= 0; )
s[i] = ucs4_to_qchar(str[i]);
}

View File

@ -87,8 +87,9 @@ void ucs4_to_qstring(docstring const & str, QString & s);
inline void ucs4_to_qstring(char_type const * str, size_t ls, QString & s)
{
s.resize(ls);
for (int i = ls; --i >= 0; )
int i = static_cast<int>(ls);
s.resize(i);
for (i ; --i >= 0; )
s[i] = ucs4_to_qchar(str[i]);
}