summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-06-21 11:50:08 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-10 23:13:14 +0200
commit1ddb4b09a852a1d950dfbde0eb0e0afe7f1a27b1 (patch)
treea0a27fdcb51d7ff12470b09f8501737064df34c5
parent70a62293a3abf43e6b5f7c0917e9e00b5066680c (diff)
Add SPL::set().
-rw-r--r--src/lib/spl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/spl.h b/src/lib/spl.h
index 547b475c8..fc694d695 100644
--- a/src/lib/spl.h
+++ b/src/lib/spl.h
@@ -60,6 +60,10 @@ public:
return _spl[index];
}
+ void set(std::size_t index, SPLEntry entry) {
+ _spl[index] = std::move(entry);
+ }
+
void swap(size_t a, size_t b) {
std::iter_swap(_spl.begin() + a, _spl.begin() + b);
}
@@ -126,6 +130,11 @@ public:
Changed(Change::CONTENT);
}
+ void set(std::size_t index, SPLEntry entry) {
+ SPL::set(index, entry);
+ Changed(Change::CONTENT);
+ }
+
boost::signals2::signal<void (Change)> Changed;
};