From 4e556e4aaba49f4307ab4933a376e0c34d0be674 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 1 May 2022 14:31:17 +1000 Subject: Optimize case where there are no annotations --- src/PerLine.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/PerLine.cxx') diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 762891ee3..2ea3f0ce4 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -357,6 +357,10 @@ std::unique_ptrAllocateAnnotation(size_t length, int style) { LineAnnotation::~LineAnnotation() { } +bool LineAnnotation::Empty() const noexcept { + return annotations.Length() == 0; +} + void LineAnnotation::Init() { ClearAll(); } -- cgit v1.2.3