From: Carl Hetherington Date: Thu, 1 Dec 2022 10:52:54 +0000 (+0100) Subject: Remove unnecessary non-const operator[]. X-Git-Tag: v2.16.36~39^2~10 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=704e1112538d809fd55bd7f25385eaa5d064966c Remove unnecessary non-const operator[]. --- 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); }