diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-01 11:52:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-01 11:52:54 +0100 |
| commit | 704e1112538d809fd55bd7f25385eaa5d064966c (patch) | |
| tree | 71563e3d9cbd182af63fac0f96faba4f73e20ec7 | |
| parent | bf471e4e6d2502bb3b4e2eb4b1309d87e1003070 (diff) | |
Remove unnecessary non-const operator[].
| -rw-r--r-- | src/lib/spl.h | 4 |
1 files changed, 1 insertions, 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); } |
