Skip to content

Commit d55648e

Browse files
committed
[RF] Implement RooLinkedList::contains()
This mimics what is done in the newer C++ standards for multiple standard library classes, and also tells cppyy how to implement `__contains__` in the Python proxy.
1 parent 0b4be8d commit d55648e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roofit/roofitcore/inc/RooLinkedList.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ class RooLinkedList : public TObject {
9595
return _first ? _first->_arg : nullptr ;
9696
}
9797

98+
// For checking if the list contains an element with a given name from Python.
99+
bool contains(const char* name) const { return find(name); }
100+
98101
void RecursiveRemove(TObject *obj) override;
99102

100103
void Print(const char* opt) const override ;

0 commit comments

Comments
 (0)