added wx_truncate_cast and use it (sometimes instead of wx_static_cast) to explicitely show int truncation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-17 21:03:45 +00:00
parent 17d8a88795
commit c781c31638
4 changed files with 18 additions and 5 deletions

View File

@@ -465,7 +465,11 @@ bool wxSound::Create(const wxString& fileName, bool isResource)
return false;
}
wxFileOffset len = fileWave.Length();
wxFileOffset lenOrig = fileWave.Length();
if ( lenOrig == wxInvalidOffset )
return false;
size_t len = wx_truncate_cast(size_t, lenOrig);
wxUint8 *data = new wxUint8[len];
if (fileWave.Read(data, len) != len)
{