Warning fixes for BCC, VC, OW and MinGW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: image.cpp
|
// Name: src/common/image.cpp
|
||||||
// Purpose: wxImage
|
// Purpose: wxImage
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
@@ -1778,7 +1778,7 @@ wxImage::HSVValue wxImage::RGBtoHSV(const RGBValue& rgb)
|
|||||||
|
|
||||||
const double value = maximumRGB;
|
const double value = maximumRGB;
|
||||||
|
|
||||||
double hue, saturation;
|
double hue = 0.0, saturation;
|
||||||
const double deltaRGB = maximumRGB - minimumRGB;
|
const double deltaRGB = maximumRGB - minimumRGB;
|
||||||
if ( wxIsNullDouble(deltaRGB) )
|
if ( wxIsNullDouble(deltaRGB) )
|
||||||
{
|
{
|
||||||
@@ -1801,6 +1801,10 @@ wxImage::HSVValue wxImage::RGBtoHSV(const RGBValue& rgb)
|
|||||||
case BLUE:
|
case BLUE:
|
||||||
hue = 4.0 + (red - green) / deltaRGB;
|
hue = 4.0 + (red - green) / deltaRGB;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
wxFAIL_MSG(wxT("hue not specified"));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
hue /= 6.0;
|
hue /= 6.0;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: imagtiff.cpp
|
// Name: src/common/imagtiff.cpp
|
||||||
// Purpose: wxImage TIFF handler
|
// Purpose: wxImage TIFF handler
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
@@ -53,7 +53,7 @@ static toff_t wxFileOffsetToTIFF(wxFileOffset ofs)
|
|||||||
return (toff_t)-1;
|
return (toff_t)-1;
|
||||||
|
|
||||||
toff_t tofs = wx_truncate_cast(toff_t, ofs);
|
toff_t tofs = wx_truncate_cast(toff_t, ofs);
|
||||||
wxCHECK_MSG( tofs == ofs, (toff_t)-1,
|
wxCHECK_MSG( (wxFileOffset)tofs == ofs, (toff_t)-1,
|
||||||
_T("TIFF library doesn't support large files") );
|
_T("TIFF library doesn't support large files") );
|
||||||
|
|
||||||
return tofs;
|
return tofs;
|
||||||
@@ -445,7 +445,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo
|
|||||||
if ( ptr[column*24 + bp*3] > 0 )
|
if ( ptr[column*24 + bp*3] > 0 )
|
||||||
{
|
{
|
||||||
// check only red as this is sufficient
|
// check only red as this is sufficient
|
||||||
reverse = reverse | 128 >> bp;
|
reverse = (uint8)(reverse | 128 >> bp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,4 +491,3 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
|
|||||||
#endif // wxUSE_STREAMS
|
#endif // wxUSE_STREAMS
|
||||||
|
|
||||||
#endif // wxUSE_LIBTIFF
|
#endif // wxUSE_LIBTIFF
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: strconv.cpp
|
// Name: src/common/strconv.cpp
|
||||||
// Purpose: Unicode conversion classes
|
// Purpose: Unicode conversion classes
|
||||||
// Author: Ove Kaaven, Robert Roebling, Vadim Zeitlin, Vaclav Slavik,
|
// Author: Ove Kaaven, Robert Roebling, Vadim Zeitlin, Vaclav Slavik,
|
||||||
// Ryan Norton, Fredrik Roubert (UTF7)
|
// Ryan Norton, Fredrik Roubert (UTF7)
|
||||||
@@ -653,7 +653,7 @@ size_t wxMBConvUTF8::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
|||||||
}
|
}
|
||||||
#else // !WC_UTF16
|
#else // !WC_UTF16
|
||||||
if (buf)
|
if (buf)
|
||||||
*buf++ = res;
|
*buf++ = (wchar_t)res;
|
||||||
len++;
|
len++;
|
||||||
#endif // WC_UTF16/!WC_UTF16
|
#endif // WC_UTF16/!WC_UTF16
|
||||||
}
|
}
|
||||||
@@ -674,7 +674,7 @@ size_t wxMBConvUTF8::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
|||||||
len += pa;
|
len += pa;
|
||||||
#else
|
#else
|
||||||
if (buf)
|
if (buf)
|
||||||
*buf++ = wxUnicodePUA + (unsigned char)*opsz;
|
*buf++ = (wchar_t)(wxUnicodePUA + (unsigned char)*opsz);
|
||||||
opsz++;
|
opsz++;
|
||||||
len++;
|
len++;
|
||||||
#endif
|
#endif
|
||||||
@@ -902,7 +902,7 @@ size_t wxMBConvUTF16straight::MB2WC(wchar_t *buf, const char *psz, size_t n) con
|
|||||||
return pa;
|
return pa;
|
||||||
|
|
||||||
if (buf)
|
if (buf)
|
||||||
*buf++ = cc;
|
*buf++ = (wchar_t)cc;
|
||||||
len++;
|
len++;
|
||||||
psz += pa * sizeof(wxUint16);
|
psz += pa * sizeof(wxUint16);
|
||||||
}
|
}
|
||||||
@@ -962,7 +962,7 @@ size_t wxMBConvUTF16swap::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
|||||||
return pa;
|
return pa;
|
||||||
|
|
||||||
if (buf)
|
if (buf)
|
||||||
*buf++ = cc;
|
*buf++ = (wchar_t)cc;
|
||||||
|
|
||||||
len++;
|
len++;
|
||||||
psz += pa * sizeof(wxUint16);
|
psz += pa * sizeof(wxUint16);
|
||||||
@@ -1163,7 +1163,7 @@ size_t wxMBConvUTF32straight::MB2WC(wchar_t *buf, const char *psz, size_t n) con
|
|||||||
while (*(wxUint32*)psz && (!buf || len < n))
|
while (*(wxUint32*)psz && (!buf || len < n))
|
||||||
{
|
{
|
||||||
if (buf)
|
if (buf)
|
||||||
*buf++ = *(wxUint32*)psz;
|
*buf++ = (wchar_t)(*(wxUint32*)psz);
|
||||||
len++;
|
len++;
|
||||||
psz += sizeof(wxUint32);
|
psz += sizeof(wxUint32);
|
||||||
}
|
}
|
||||||
@@ -2845,5 +2845,3 @@ WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
|||||||
wxConvUTF8;
|
wxConvUTF8;
|
||||||
|
|
||||||
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user