RTGroup 2: App: add PropertyListsT::removeIf() (#26173)

* App: add PropertyListsT::removeIf()

For convenient list value filtering.
Co-authored-by: Zheng Lei <[email protected]>

* Update Property.h

* Update Property.h
This commit is contained in:
PaddleStroke
2026-03-06 19:15:33 +00:00
committed by GitHub
parent 840122a358
commit bc0d94d7a7
+10
View File
@@ -1097,6 +1097,16 @@ public:
guard.tryInvoke();
}
template<std::predicate<const T&> F>
int removeIf(F f) {
ListT vals = _lValueList;
size_t removed = std::erase_if(vals, f);
if (removed > 0) {
setValues(std::move(vals));
}
return static_cast<int>(removed);
}
protected:
void setPyValues(const std::vector<PyObject*>& vals, const std::vector<int>& indices) override
{