projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary non-const operator[].
[dcpomatic.git]
/
src
/
lib
/
spl.h
diff --git
a/src/lib/spl.h
b/src/lib/spl.h
index fa8f38105efce48279d0a09d3424f9b0f008c461..b002a08829bdeadaa1be72a00b33bbcca1d0c6d4 100644
(file)
--- a/
src/lib/spl.h
+++ b/
src/lib/spl.h
@@
-18,15
+18,20
@@
*/
*/
+
#ifndef DCPOMATIC_SPL_H
#define DCPOMATIC_SPL_H
#ifndef DCPOMATIC_SPL_H
#define DCPOMATIC_SPL_H
+
#include "spl_entry.h"
#include <dcp/util.h>
#include <boost/signals2.hpp>
#include "spl_entry.h"
#include <dcp/util.h>
#include <boost/signals2.hpp>
+#include <algorithm>
+
class ContentStore;
class ContentStore;
+
class SPL
{
public:
class SPL
{
public:
@@
-54,12
+59,12
@@
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 read (boost::filesystem::path path, ContentStore* store);
}
void read (boost::filesystem::path path, ContentStore* store);