Add rule of five for Fl_Widget_Tracker.
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

Widget tracking is linking back to a instance of
Fl_Widget_Tracker. Copying or moving one will
potentially crash an app, so disable it.
This commit is contained in:
Matthias Melcher
2025-11-06 15:31:46 +01:00
parent 87f9a6f4d6
commit 4966cc7a1e

View File

@@ -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();
/**