mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Also do the comperty comparison in C++
This commit is contained in:
parent
2ece3817cc
commit
1eb7203ec8
6 changed files with 82 additions and 4 deletions
|
@ -17,12 +17,19 @@ namespace sixtyfps {
|
|||
struct Resource
|
||||
{
|
||||
public:
|
||||
using Tag = cbindgen_private::types::Resource::Tag;
|
||||
|
||||
Resource() : data(Data::None()) { }
|
||||
Resource(const SharedString &file_path) : data(Data::AbsoluteFilePath(file_path)) { }
|
||||
|
||||
friend bool operator==(const Resource &a, const Resource &b) {
|
||||
return a.data == b.data;
|
||||
}
|
||||
friend bool operator!=(const Resource &a, const Resource &b) {
|
||||
return a.data != b.data;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
using Tag = cbindgen_private::types::Resource::Tag;
|
||||
using Data = cbindgen_private::types::Resource;
|
||||
Data data;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue