summaryrefslogtreecommitdiff
path: root/FL/Fl.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2025-11-06 15:31:46 +0100
committerMatthias Melcher <github@matthiasm.com>2025-11-06 15:31:46 +0100
commit4966cc7a1e7adcfcab73f63e3eba44a077b21029 (patch)
tree77c28317002f3d7cbe2e0cef30c6f65a432395c0 /FL/Fl.H
parent87f9a6f4d614b7061301c1fafb289d2f1d75acc4 (diff)
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.
Diffstat (limited to 'FL/Fl.H')
-rw-r--r--FL/Fl.H6
1 files changed, 6 insertions, 0 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 92e97788d..c8552884b 100644
--- a/FL/Fl.H
+++ b/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();
/**