diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-09 16:55:17 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-09 16:55:17 +1000 |
commit | da34a05d99e324ffc3ca802ca9d65db2a4e7eac9 (patch) | |
tree | c0a586a232d664f3252e697fa98d840993490f3f /src/Editor.cxx | |
parent | 1b763e30f00b6f03d506bf1e1fa0c6cb5264205e (diff) | |
download | scintilla-mirror-da34a05d99e324ffc3ca802ca9d65db2a4e7eac9.tar.gz |
Further use of range-for.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 78b1845db..2c7c2e5a2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4147,9 +4147,8 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) { std::vector<SelectionRange> rangesInOrder = sel.RangesCopy(); if (sel.selType == Selection::selRectangle) std::sort(rangesInOrder.begin(), rangesInOrder.end()); - for (size_t r=0; r<rangesInOrder.size(); r++) { - const SelectionRange current = rangesInOrder[r]; - text.append(RangeText(current.Start().Position(), current.End().Position())); + for (const SelectionRange ¤t : rangesInOrder) { + text.append(RangeText(current.Start().Position(), current.End().Position())); if (sel.selType == Selection::selRectangle) { if (pdoc->eolMode != SC_EOL_LF) text.push_back('\r'); |