/////////////////////////////////////////////////////////////////////////////
-// Name: ffile.cpp
+// Name: src/common/ffile.cpp
// Purpose: wxFFile encapsulates "FILE *" IO stream
// Author: Vadim Zeitlin
// Modified by:
}
buf.data()[length] = 0;
- *str = wxString(buf, conv);
+
+ wxString strTmp(buf, conv);
+ str->swap(strTmp);
return true;
}
wxCHECK_MSG( IsOpened(), wxInvalidOffset,
wxT("wxFFile::Length(): file is closed!") );
- wxFFile& self = *(wxFFile *)this; // const_cast
+ wxFFile& self = *const_cast<wxFFile *>(this);
wxFileOffset posOld = Tell();
if ( posOld != wxInvalidOffset )