From 15e24b271d134ce630d5034ca8a1bf8c08dc6a56 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 28 Jun 2023 08:42:26 +1000 Subject: Add const where viable. --- src/Editor.h | 2 +- src/PerLine.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.h b/src/Editor.h index f9d938685..54ca1110f 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -699,7 +699,7 @@ public: AutoSurface(const Editor *ed) : surf(ed->CreateMeasurementSurface()) { } - AutoSurface(SurfaceID sid, Editor *ed, std::optional technology = {}) : + AutoSurface(SurfaceID sid, const Editor *ed, std::optional technology = {}) : surf(ed->CreateDrawingSurface(sid, technology)) { } // Deleted so AutoSurface objects can not be copied. diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 4d76b0b79..b2e4530ea 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -540,7 +540,7 @@ bool LineTabstops::AddTabstop(Sci::Line line, int x) { int LineTabstops::GetNextTabstop(Sci::Line line, int x) const noexcept { if (line < tabstops.Length()) { - TabstopList *tl = tabstops[line].get(); + const TabstopList *tl = tabstops[line].get(); if (tl) { for (const int i : *tl) { if (i > x) { -- cgit v1.2.3