From 0fd5c7e24ad9589daa37c948649ea6da0a949703 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 4 Jun 2018 14:46:14 +1000 Subject: Backport: Reduce scope of captures for lambdas. Use noexcept. Backport of changeset 7021:764284d21a03. --- src/PerLine.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/PerLine.cxx') diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 8240f4829..4ac4de9ce 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -60,7 +60,7 @@ bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { } void MarkerHandleSet::RemoveHandle(int handle) { - mhList.remove_if([=](const MarkerHandleNumber &mhn) { return mhn.handle == handle; }); + mhList.remove_if([handle](const MarkerHandleNumber &mhn) { return mhn.handle == handle; }); } bool MarkerHandleSet::RemoveNumber(int markerNum, bool all) { @@ -284,7 +284,7 @@ Sci::Line LineState::GetMaxLineState() const { return static_cast(lineStates.Length()); } -static int NumberLines(const char *text) { +static int NumberLines(const char *text) noexcept { if (text) { int newLines = 0; while (*text) { -- cgit v1.2.3