X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1ac140d2a165827a40783130b96f5c53d394efcb..835165d576b66441987b78519e6ef1fe74ea795a:/include/wx/textbuf.h diff --git a/include/wx/textbuf.h b/include/wx/textbuf.h index a5d39703ca..0db6a65279 100644 --- a/include/wx/textbuf.h +++ b/include/wx/textbuf.h @@ -99,8 +99,10 @@ public: size_t GetLineCount() const { return m_aLines.size(); } // the returned line may be modified (but don't add CR/LF at the end!) - wxString& GetLine(size_t n) const { return (wxString&)m_aLines[n]; } - wxString& operator[](size_t n) const { return (wxString&)m_aLines[n]; } + wxString& GetLine(size_t n) { return m_aLines[n]; } + const wxString& GetLine(size_t n) const { return m_aLines[n]; } + wxString& operator[](size_t n) { return m_aLines[n]; } + const wxString& operator[](size_t n) const { return m_aLines[n]; } // the current line has meaning only when you're using // GetFirstLine()/GetNextLine() functions, it doesn't get updated when