mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Fix __eq__ and __ne__ for comparing TreeListItem with None
This commit is contained in:
@@ -51,9 +51,10 @@ def run():
|
||||
return (long)self->GetID();
|
||||
""")
|
||||
|
||||
c.addCppMethod('bool', '__eq__', '(wxTreeListItem* other)', "return (self->GetID() == other->GetID());")
|
||||
c.addCppMethod('bool', '__ne__', '(wxTreeListItem* other)', "return (self->GetID() != other->GetID());")
|
||||
|
||||
c.addCppMethod('bool', '__eq__', '(wxTreeListItem* other)',
|
||||
"return other ? (self->GetID() == other->GetID()) : false;")
|
||||
c.addCppMethod('bool', '__ne__', '(wxTreeListItem* other)',
|
||||
"return other ? (self->GetID() != other->GetID()) : true;")
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
c = module.find('wxTreeListItemComparator')
|
||||
|
||||
Reference in New Issue
Block a user