diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-01 11:52:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-01 11:52:45 +0100 |
| commit | bf471e4e6d2502bb3b4e2eb4b1309d87e1003070 (patch) | |
| tree | f0daba5ca3acf9d885cda96284805847895bc577 /src/lib/spl.h | |
| parent | 0c5f0e48080a28d3cfa9f8e2f4948bbc57bc0307 (diff) | |
Add and use SPL::swap().
Diffstat (limited to 'src/lib/spl.h')
| -rw-r--r-- | src/lib/spl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/spl.h b/src/lib/spl.h index 49eb93df2..d7c746d1e 100644 --- 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 <algorithm> + class ContentStore; @@ -63,6 +65,8 @@ public: 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); |
