mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
C++: Warn when the return value of slint::Image::load_from_path
is not used
Somebody recently accidentally wrote this code: ```cpp slint::Image image; image.load_from_path(...); ``` and that should have produced a warning.
This commit is contained in:
parent
f5b3e89e08
commit
77645d9908
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ public:
|
|||
Image() : data(Data::ImageInner_None()) { }
|
||||
|
||||
/// Load an image from an image file
|
||||
static Image load_from_path(const SharedString &file_path)
|
||||
[[nodiscard]] static Image load_from_path(const SharedString &file_path)
|
||||
{
|
||||
Image img;
|
||||
cbindgen_private::types::slint_image_load_from_path(&file_path, &img.data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue