X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..2cbfa061b44c7460adf3f06d09b4fbf304ed3a87:/src/common/textbuf.cpp diff --git a/src/common/textbuf.cpp b/src/common/textbuf.cpp index 1e6c9a9e83..b741896ab6 100644 --- a/src/common/textbuf.cpp +++ b/src/common/textbuf.cpp @@ -143,11 +143,12 @@ wxTextBuffer::wxTextBuffer(const wxString& strBufferName) : m_strBufferName(strBufferName) { m_nCurLine = 0; - m_isOpened = FALSE; + m_isOpened = false; } wxTextBuffer::~wxTextBuffer() { + // required here for Darwin } // ---------------------------------------------------------------------------- @@ -172,13 +173,13 @@ bool wxTextBuffer::Create() wxASSERT( !m_strBufferName.IsEmpty() ); // if the buffer already exists do nothing - if ( Exists() ) return FALSE; - + if ( Exists() ) return false; + if ( !OnOpen(m_strBufferName, WriteAccess) ) - return FALSE; + return false; OnClose(); - return TRUE; + return true; } bool wxTextBuffer::Open(const wxString& strBufferName, wxMBConv& conv) @@ -195,7 +196,7 @@ bool wxTextBuffer::Open(wxMBConv& conv) // open buffer in read-only mode if ( !OnOpen(m_strBufferName, ReadAccess) ) - return FALSE; + return false; // read buffer into memory m_isOpened = OnRead(conv); @@ -275,9 +276,9 @@ bool wxTextBuffer::Close() m_aTypes.Clear(); m_aLines.Clear(); m_nCurLine = 0; - m_isOpened = FALSE; + m_isOpened = false; - return TRUE; + return true; } bool wxTextBuffer::Write(wxTextFileType typeNew, wxMBConv& conv)