From 704e1112538d809fd55bd7f25385eaa5d064966c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 1 Dec 2022 11:52:54 +0100 Subject: [PATCH] Remove unnecessary non-const operator[]. --- src/lib/spl.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/spl.h b/src/lib/spl.h index d7c746d1e..b002a0882 100644 --- a/src/lib/spl.h +++ b/src/lib/spl.h @@ -59,12 +59,10 @@ public: return _spl; } - SPLEntry & operator[] (std::size_t index) { + SPLEntry const & operator[] (std::size_t index) const { return _spl[index]; } - SPLEntry const & operator[] (std::size_t index) const { - return _spl[index]; void swap(size_t a, size_t b) { std::iter_swap(_spl.begin() + a, _spl.begin() + b); } -- 2.30.2