projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf471e4
)
Remove unnecessary non-const operator[].
author
Carl Hetherington
<cth@carlh.net>
Thu, 1 Dec 2022 10:52:54 +0000
(11:52 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 1 Dec 2022 10:52:54 +0000
(11:52 +0100)
src/lib/spl.h
patch
|
blob
|
history
diff --git
a/src/lib/spl.h
b/src/lib/spl.h
index d7c746d1e39d1121bdbfdd3886682d4d05aa7d1e..b002a08829bdeadaa1be72a00b33bbcca1d0c6d4 100644
(file)
--- a/
src/lib/spl.h
+++ b/
src/lib/spl.h
@@
-59,12
+59,10
@@
public:
return _spl;
}
return _spl;
}
- SPLEntry
& operator[] (std::size_t index)
{
+ SPLEntry
const & operator[] (std::size_t index) const
{
return _spl[index];
}
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);
}
void swap(size_t a, size_t b) {
std::iter_swap(_spl.begin() + a, _spl.begin() + b);
}