From: Vadim Zeitlin Date: Sat, 5 Nov 2011 10:28:48 +0000 (+0000) Subject: Rename lineAnchor in Scintilla code to avoid shadowing warning. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/86cf0018d36fbdbcecccf66d3843659ea4da0236?ds=inline Rename lineAnchor in Scintilla code to avoid shadowing warning. Local variable "lineAnchor" in Editor::SetRectangularRange() was shadowing the member variable Editor::lineAnchor, resulting in warnings from some compilers (AIX xlC, Sun CC). Rename it to "lineAnchorRect", just as it was done in the latest Scintilla sources, to avoid them. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx index 014aca5f9a..9cd4309c53 100644 --- a/src/stc/scintilla/src/Editor.cxx +++ b/src/stc/scintilla/src/Editor.cxx @@ -689,14 +689,14 @@ void Editor::SetRectangularRange() { if (sel.selType == Selection::selThin) { xCaret = xAnchor; } - int lineAnchor = pdoc->LineFromPosition(sel.Rectangular().anchor.Position()); + int lineAnchorRect = pdoc->LineFromPosition(sel.Rectangular().anchor.Position()); int lineCaret = pdoc->LineFromPosition(sel.Rectangular().caret.Position()); - int increment = (lineCaret > lineAnchor) ? 1 : -1; - for (int line=lineAnchor; line != lineCaret+increment; line += increment) { + int increment = (lineCaret > lineAnchorRect) ? 1 : -1; + for (int line=lineAnchorRect; line != lineCaret+increment; line += increment) { SelectionRange range(SPositionFromLineX(line, xCaret), SPositionFromLineX(line, xAnchor)); if ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) == 0) range.ClearVirtualSpace(); - if (line == lineAnchor) + if (line == lineAnchorRect) sel.SetSelection(range); else sel.AddSelection(range);