summaryrefslogtreecommitdiff
path: root/fluid/app/Image_Asset.h
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 02:49:13 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 02:49:13 +0500
commitc19f34db2f4a64326d03cee7edae095051660f65 (patch)
tree3c8defa8bcafe90fb907dace5d2a21c2ca5e0f8a /fluid/app/Image_Asset.h
parent43e0a37906afabb0b3b091b8d3eac9a910cae50c (diff)
wip
Diffstat (limited to 'fluid/app/Image_Asset.h')
-rw-r--r--fluid/app/Image_Asset.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/fluid/app/Image_Asset.h b/fluid/app/Image_Asset.h
index fcc8fb31c..1d6909a70 100644
--- a/fluid/app/Image_Asset.h
+++ b/fluid/app/Image_Asset.h
@@ -29,11 +29,11 @@
class Image_Asset {
private: // member variables
- bool is_animated_gif_ = false; ///< It's an animated gif.
- std::string filename_ { }; ///< Relative path to the image file
- int refcount_ = 0; ///< Reference count
- Fl_Shared_Image *image_ = 0; ///< The actual image as managed by FLTK
- std::string initializer_function_ { }; ///< The name of the initializer function
+ int is_animated_gif_; ///< It's an animated gif.
+ char *filename_; ///< Relative path to the image file
+ int refcount_; ///< Reference count
+ Fl_Shared_Image *image_; ///< The actual image as managed by FLTK
+ char *initializer_function_; ///< The name of the initializer function
private: // methods
Image_Asset(const char *name); // no public constructor
@@ -52,7 +52,7 @@ public: // methods
void write_code(fld::io::Code_Writer& f, int bind, const char *var, int inactive = 0);
void write_inline(fld::io::Code_Writer& f, int inactive = 0);
void write_file_error(fld::io::Code_Writer& f, const char *fmt);
- const char *filename() const { return filename_.c_str(); }
+ const char *filename() const { return filename_ ? filename_ : ""; }
};
// pop up file chooser and return a legal image selected by user,