X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fspl.h;h=f55a9fe1fd89c1405b2ff7887eec914f6d25d34d;hb=7274622a833c05eee36b7e59d8ec2ca3e136d140;hp=d7c746d1e39d1121bdbfdd3886682d4d05aa7d1e;hpb=bf471e4e6d2502bb3b4e2eb4b1309d87e1003070;p=dcpomatic.git diff --git a/src/lib/spl.h b/src/lib/spl.h index d7c746d1e..f55a9fe1f 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); } @@ -116,6 +114,21 @@ public: Changed(Change::NAME); } + void add(SPLEntry e) { + SPL::add(e); + Changed(Change::CONTENT); + } + + void remove(std::size_t index) { + SPL::remove(index); + Changed(Change::CONTENT); + } + + void swap(size_t a, size_t b) { + SPL::swap(a, b); + Changed(Change::CONTENT); + } + boost::signals2::signal Changed; };