[master] 4966cc7 - Add rule of five for Fl_Widget_Tracker.
"Matthias Melcher"
Nov 06, 2025
commit 4966cc7a1e7adcfcab73f63e3eba44a077b21029
Author: Matthias Melcher <github@matthiasm.com>
AuthorDate: Thu Nov 6 15:31:46 2025 +0100
Commit: Matthias Melcher <github@matthiasm.com>
CommitDate: Thu Nov 6 15:31:46 2025 +0100
Add rule of five for Fl_Widget_Tracker.
Widget tracking is linking back to a instance of
Fl_Widget_Tracker. Copying or moving one will
potentially crash an app, so disable it.
FL/Fl.H | 6 ++++++
1 file changed, 6 insertions(+)
diff --git FL/Fl.H FL/Fl.H
index 92e9778..c855288 100644
--- FL/Fl.H
+++ FL/Fl.H
@@ -1598,6 +1598,12 @@ class FL_EXPORT Fl_Widget_Tracker {
public:
Fl_Widget_Tracker(Fl_Widget *wi);
+ // Rule of five. Note that we *can* implement these when we refactor widget
+ // tracking with a C++11 map or unordered_map, for example.
+ Fl_Widget_Tracker(const Fl_Widget_Tracker&) = delete;
+ Fl_Widget_Tracker(Fl_Widget_Tracker&&) = delete;
+ Fl_Widget_Tracker& operator=(const Fl_Widget_Tracker&) = delete;
+ Fl_Widget_Tracker& operator=(Fl_Widget_Tracker&&) = delete;
~Fl_Widget_Tracker();
/**
Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.