mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 04:45:13 +00:00
Fix crash when using optimized gcc builds
Don't return void in non-void functions.
This commit is contained in:
parent
5ee09398e8
commit
12457ed7f3
1 changed files with 3 additions and 1 deletions
|
@ -20,13 +20,15 @@ struct SharedString
|
|||
{
|
||||
internal::sixtyfps_shared_string_drop(this);
|
||||
internal::sixtyfps_shared_string_clone(this, &other);
|
||||
return *this;
|
||||
}
|
||||
SharedString &operator=(std::string_view s)
|
||||
{
|
||||
internal::sixtyfps_shared_string_drop(this);
|
||||
internal::sixtyfps_shared_string_from_bytes(this, s.data(), s.size());
|
||||
return *this;
|
||||
}
|
||||
SharedString &operator=(SharedString &&other) { std::swap(inner, other.inner); }
|
||||
SharedString &operator=(SharedString &&other) { std::swap(inner, other.inner); return *this; }
|
||||
|
||||
operator std::string_view() const { return internal::sixtyfps_shared_string_bytes(this); }
|
||||
auto data() const -> const char * { return internal::sixtyfps_shared_string_bytes(this); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue