From 16a2525ff288d91605e5b54fc6ac269b45dddf7d Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 8 Jan 2011 17:17:10 +0000 Subject: [PATCH] proper const-ness for GetLine() and operator[]() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/textbuf.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.47.2