fixed assert to avoid compilation warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,21 +61,22 @@ bool wxTextFile::OnExists() const
|
||||
|
||||
bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode OpenMode)
|
||||
{
|
||||
wxFile::OpenMode FileOpenMode = wxFile::read;
|
||||
int nAssertVal = 0;
|
||||
wxFile::OpenMode FileOpenMode;
|
||||
|
||||
switch ( OpenMode )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown open mode in wxTextFile::Open") );
|
||||
// fall through
|
||||
|
||||
switch (OpenMode)
|
||||
{
|
||||
case ReadAccess :
|
||||
FileOpenMode = wxFile::read;
|
||||
break;
|
||||
|
||||
case WriteAccess :
|
||||
FileOpenMode = wxFile::write;
|
||||
break;
|
||||
default :
|
||||
wxASSERT(nAssertVal); // Should not happen.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return m_file.Open(strBufferName.c_str(), FileOpenMode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user