From: David Webster Date: Fri, 30 Nov 2001 22:10:31 +0000 (+0000) Subject: Can't just wxASSERT(0). Give "constant in conditional expression" errors on some... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/27752aab2a347fe56975291ef933874c7e3c308b Can't just wxASSERT(0). Give "constant in conditional expression" errors on some compilers. Also bad control codes on the end of some preprocessor constants. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index adf3aa659b..77510ace07 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -62,7 +62,8 @@ bool wxTextFile::OnExists() const bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode OpenMode) { wxFile::OpenMode FileOpenMode = wxFile::read; - + int nAssertVal = 0; + switch (OpenMode) { case ReadAccess : @@ -72,7 +73,7 @@ bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode Open FileOpenMode = wxFile::write; break; default : - wxASSERT(0); // Should not happen. + wxASSERT(nAssertVal); // Should not happen. break; }