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
This commit is contained in:
parent
e2623304af
commit
86cf0018d3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user