mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
C++: implements operator== for StandardListViewItem
This commit is contained in:
parent
1eb7203ec8
commit
cc85aa818d
1 changed files with 8 additions and 0 deletions
|
@ -587,5 +587,13 @@ struct VersionCheckHelper
|
|||
}
|
||||
|
||||
using cbindgen_private::StandardListViewItem;
|
||||
bool operator==(const StandardListViewItem &a, const StandardListViewItem &b) {
|
||||
static_assert(sizeof(StandardListViewItem) == sizeof(std::tuple<SharedString>), "This should be updated if there are more fields");
|
||||
return a.text == b.text;
|
||||
}
|
||||
bool operator!=(const StandardListViewItem &a, const StandardListViewItem &b) {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
|
||||
} // namespace sixtyfps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue