* Removed some warnings

dev-ui
erihel 2012-09-22 11:48:41 +02:00
parent 0ff419560d
commit 37e7c73f43
3 changed files with 11 additions and 11 deletions

View File

@ -2861,16 +2861,16 @@ public:
// the distribution but are publically available from unicode.org
// at http://www.unicode.org/Public/PROGRAMS/CVTUTF/
ConversionResult retval;
const UTF8 * pUtf8 = (const UTF8 *) a_pInputData;
const UTF8 * pUtf8 = static_cast<const UTF8 *>(a_pInputData);
if (sizeof(wchar_t) == sizeof(UTF32)) {
UTF32 * pUtf32 = (UTF32 *) a_pOutputData;
UTF32 * pUtf32 = static_cast<UTF32 *>(a_pOutputData);
retval = ConvertUTF8toUTF32(
&pUtf8, pUtf8 + a_uInputDataLen,
&pUtf32, pUtf32 + a_uOutputDataSize,
lenientConversion);
}
else if (sizeof(wchar_t) == sizeof(UTF16)) {
UTF16 * pUtf16 = (UTF16 *) a_pOutputData;
UTF16 * pUtf16 = static_cast<UTF16 *>(a_pOutputData);
retval = ConvertUTF8toUTF16(
&pUtf8, pUtf8 + a_uInputDataLen,
&pUtf16, pUtf16 + a_uOutputDataSize,
@ -2881,7 +2881,7 @@ public:
else {
size_t retval = mbstowcs(a_pOutputData,
a_pInputData, a_uOutputDataSize);
return retval != (size_t)(-1);
return retval != static_cast<size_t>(-1);
}
}
@ -2908,7 +2908,7 @@ public:
}
else {
size_t uLen = wcstombs(NULL, a_pInputData, 0);
if (uLen == (size_t)(-1)) {
if (uLen == static_cast<size_t>(-1)) {
return uLen;
}
return uLen + 1; // include NULL terminator
@ -2948,16 +2948,16 @@ public:
// the distribution but are publically available from unicode.org
// at http://www.unicode.org/Public/PROGRAMS/CVTUTF/
ConversionResult retval;
UTF8 * pUtf8 = (UTF8 *) a_pOutputData;
UTF8 * pUtf8 = static_cast<UTF8 *> (a_pOutputData);
if (sizeof(wchar_t) == sizeof(UTF32)) {
const UTF32 * pUtf32 = (const UTF32 *) a_pInputData;
const UTF32 * pUtf32 = static_cast<const UTF32 *> (a_pInputData);
retval = ConvertUTF32toUTF8(
&pUtf32, pUtf32 + uInputLen,
&pUtf8, pUtf8 + a_uOutputDataSize,
lenientConversion);
}
else if (sizeof(wchar_t) == sizeof(UTF16)) {
const UTF16 * pUtf16 = (const UTF16 *) a_pInputData;
const UTF16 * pUtf16 = static_cast<const UTF16 *> (a_pInputData);
retval = ConvertUTF16toUTF8(
&pUtf16, pUtf16 + uInputLen,
&pUtf8, pUtf8 + a_uOutputDataSize,
@ -2968,7 +2968,7 @@ public:
else {
size_t retval = wcstombs(a_pOutputData,
a_pInputData, a_uOutputDataSize);
return retval != (size_t) -1;
return retval != static_cast<size_t> (-1);
}
}
};

View File

@ -188,7 +188,7 @@ CBotString CBotString::Right(int nCount) const
if ( i < 0 ) i = 0;
int j;
for (int j = 0 ; i < m_lg && i < 1999; ++i)
for (j = 0 ; i < m_lg && i < 1999; ++i)
{
chain[j++] = m_ptr[i];
}

View File

@ -50,7 +50,7 @@ class CKey : public CControl
protected:
bool TestKey(int key);
int m_key[2];
unsigned int m_key[2];
bool m_bCatch;
CApplication *m_app;