X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..301e257baf3a227beb587749134bbc40786f761f:/src/common/textbuf.cpp diff --git a/src/common/textbuf.cpp b/src/common/textbuf.cpp index 54bb5d5c96..b741896ab6 100644 --- a/src/common/textbuf.cpp +++ b/src/common/textbuf.cpp @@ -4,7 +4,7 @@ // Created: 14.11.01 // Author: Morten Hanssen, Vadim Zeitlin // Copyright: (c) 1998-2001 wxWidgets team -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -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)