From 66f7db2527db8d4ca247dd8e086e2991feb10a91 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 1 Jul 2019 09:44:16 +1000 Subject: Backport: Use noexcept in HighlightDelimiter - its a simple struct. Backport of changeset 7615:216fdb644bfa. --- src/Document.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Document.h b/src/Document.h index f662dc993..4e376a75b 100644 --- a/src/Document.h +++ b/src/Document.h @@ -137,23 +137,23 @@ public: firstChangeableLineAfter = -1; } - bool NeedsDrawing(Sci::Line line) const { + bool NeedsDrawing(Sci::Line line) const noexcept { return isEnabled && (line <= firstChangeableLineBefore || line >= firstChangeableLineAfter); } - bool IsFoldBlockHighlighted(Sci::Line line) const { + bool IsFoldBlockHighlighted(Sci::Line line) const noexcept { return isEnabled && beginFoldBlock != -1 && beginFoldBlock <= line && line <= endFoldBlock; } - bool IsHeadOfFoldBlock(Sci::Line line) const { + bool IsHeadOfFoldBlock(Sci::Line line) const noexcept { return beginFoldBlock == line && line < endFoldBlock; } - bool IsBodyOfFoldBlock(Sci::Line line) const { + bool IsBodyOfFoldBlock(Sci::Line line) const noexcept { return beginFoldBlock != -1 && beginFoldBlock < line && line < endFoldBlock; } - bool IsTailOfFoldBlock(Sci::Line line) const { + bool IsTailOfFoldBlock(Sci::Line line) const noexcept { return beginFoldBlock != -1 && beginFoldBlock < line && line == endFoldBlock; } -- cgit v1.2.3