mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
C++: use default operator==
Since we now use C++20, we can simplify our code a bit
This commit is contained in:
parent
36e07b8801
commit
319704d3fb
8 changed files with 13 additions and 75 deletions
|
@ -352,7 +352,12 @@ fn gen_corelib(
|
|||
config.export.body.insert(
|
||||
"LayoutInfo".to_owned(),
|
||||
" inline LayoutInfo merge(const LayoutInfo &other) const;
|
||||
friend inline LayoutInfo operator+(const LayoutInfo &a, const LayoutInfo &b) { return a.merge(b); }".into(),
|
||||
friend inline LayoutInfo operator+(const LayoutInfo &a, const LayoutInfo &b) { return a.merge(b); }
|
||||
friend bool operator==(const LayoutInfo&, const LayoutInfo&) = default;".into(),
|
||||
);
|
||||
config.export.body.insert(
|
||||
"StandardListViewItem".to_owned(),
|
||||
"friend bool operator==(const StandardListViewItem&, const StandardListViewItem&) = default;".into(),
|
||||
);
|
||||
config
|
||||
.export
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue