diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index f71fe5f772..1edf28158e 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -4628,7 +4628,7 @@ public: // implement wxTextAreaBase pure virtual methods // --------------------------------------------- - virtual int GetLineLength(long n) const { return GetLine(n).length(); } + virtual int GetLineLength(long lineNo) const { return static_cast(GetLineText(lineNo).length()); } virtual wxString GetLineText(long lineNo) const { wxString text = GetLine(static_cast(lineNo)); diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index e4b3a05406..1c980ab3cc 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -370,7 +370,7 @@ public: // implement wxTextAreaBase pure virtual methods // --------------------------------------------- - virtual int GetLineLength(long n) const { return GetLine(n).length(); } + virtual int GetLineLength(long lineNo) const { return static_cast(GetLineText(lineNo).length()); } virtual wxString GetLineText(long lineNo) const { wxString text = GetLine(static_cast(lineNo));