aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-09-16 08:58:56 +1000
committerNeil <nyamatongwe@gmail.com>2018-09-16 08:58:56 +1000
commitf00ec0861b9ed5a4fc80be2a1832274da3c12ff9 (patch)
tree0dcfceeae165a782cd7e789a239d6d925718e3ef /src/Document.cxx
parent237d86bf515aba87c099056311b75b13761371d1 (diff)
downloadscintilla-mirror-f00ec0861b9ed5a4fc80be2a1832274da3c12ff9.tar.gz
Moved declaration to avoid warnings from linters.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 3d5ae2d49..04efe2e32 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -2980,7 +2980,6 @@ std::regex_constants::match_flag_type MatchFlags(const Document *doc, Sci::Posit
template<typename Iterator, typename Regex>
bool MatchOnLines(const Document *doc, const Regex &regexp, const RESearchRange &resr, RESearch &search) {
- bool matched = false;
std::match_results<Iterator> match;
// MSVC and libc++ have problems with ^ and $ matching line ends inside a range.
@@ -2994,9 +2993,10 @@ bool MatchOnLines(const Document *doc, const Regex &regexp, const RESearchRange
Iterator itStart(doc, resr.startPos);
Iterator itEnd(doc, resr.endPos);
const std::regex_constants::match_flag_type flagsMatch = MatchFlags(doc, resr.startPos, resr.endPos);
- matched = std::regex_search(itStart, itEnd, match, regexp, flagsMatch);
+ const bool matched = std::regex_search(itStart, itEnd, match, regexp, flagsMatch);
#else
// Line by line.
+ bool matched = false;
for (Sci::Line line = resr.lineRangeStart; line != resr.lineRangeBreak; line += resr.increment) {
const Range lineRange = resr.LineRange(line);
Iterator itStart(doc, lineRange.start);