From 179771acd25ee5ff8e36a5fd192682d4d55c52af Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 26 Jan 2023 15:23:43 +0100 Subject: Fixing FLUID file corruption from issue #653 (#662) Removing all globals in file writer (#653 ) Fix some static analyser complaints Valgrind: handle width==0 in GfxDrivers on Wayland and X11 Don't use `Fl_Input_::static_value`, it accesses previous buffer that may be deleted Project file write encapsulated, removing globals Encapsulating project file reader, removing states in glbals Project i/o increased source code readability --- fluid/Fl_Menu_Type.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fluid/Fl_Menu_Type.h') diff --git a/fluid/Fl_Menu_Type.h b/fluid/Fl_Menu_Type.h index 6b8da257c..5aca716c8 100644 --- a/fluid/Fl_Menu_Type.h +++ b/fluid/Fl_Menu_Type.h @@ -41,12 +41,12 @@ public: int is_button() const FL_OVERRIDE {return 1;} // this gets shortcut to work Fl_Widget* widget(int,int,int,int) FL_OVERRIDE {return 0;} Fl_Widget_Type* _make() FL_OVERRIDE {return 0;} - virtual const char* menu_name(int& i); + virtual const char* menu_name(Fd_Code_Writer& f, int& i); int flags(); - void write_static() FL_OVERRIDE; - void write_item(); - void write_code1() FL_OVERRIDE; - void write_code2() FL_OVERRIDE; + void write_static(Fd_Code_Writer& f) FL_OVERRIDE; + void write_item(Fd_Code_Writer& f); + void write_code1(Fd_Code_Writer& f) FL_OVERRIDE; + void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; int pixmapID() FL_OVERRIDE { return 16; } }; @@ -105,7 +105,7 @@ public: void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE {build_menu();} void remove_child(Fl_Type*) FL_OVERRIDE {build_menu();} Fl_Type* click_test(int x, int y) FL_OVERRIDE; - void write_code2() FL_OVERRIDE; + void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; void copy_properties() FL_OVERRIDE; }; -- cgit v1.2.3