Silence warnings in headers with MSC -W4

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2013-10-16 16:45:53 +00:00
parent 409821d9ce
commit 1e35c3b915
3 changed files with 5 additions and 3 deletions

View File

@@ -310,8 +310,10 @@ typedef short int WXTYPE;
inline T wx_truncate_cast_impl(X x)
{
#pragma warning(push)
/* conversion from 'X' to 'T', possible loss of data */
/* conversion from 'size_t' to 'type', possible loss of data */
#pragma warning(disable: 4267)
/* conversion from 'type1' to 'type2', possible loss of data */
#pragma warning(disable: 4242)
return x;

View File

@@ -748,7 +748,7 @@ struct wxArgNormalizer<const wxUniChar&> : public wxArgNormalizer<wchar_t>
{
wxArgNormalizer(const wxUniChar& s,
const wxFormatString *fmt, unsigned index)
: wxArgNormalizer<wchar_t>(s.GetValue(), fmt, index) {}
: wxArgNormalizer<wchar_t>(wx_truncate_cast(wchar_t, s.GetValue()), fmt, index) {}
};
// for wchar_t, default handler does the right thing

View File

@@ -161,7 +161,7 @@ private:
return ToHi8bit(c);
#else
return c;
return wx_truncate_cast(char, c);
#endif
}