projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add and use SPL::swap().
[dcpomatic.git]
/
src
/
lib
/
spl.h
diff --git
a/src/lib/spl.h
b/src/lib/spl.h
index 49eb93df236f7ab709080e41678e54b8a66db54a..d7c746d1e39d1121bdbfdd3886682d4d05aa7d1e 100644
(file)
--- a/
src/lib/spl.h
+++ b/
src/lib/spl.h
@@
-26,6
+26,8
@@
#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;
@@
-63,6
+65,8
@@
public:
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);
}
void read (boost::filesystem::path path, ContentStore* store);
}
void read (boost::filesystem::path path, ContentStore* store);