diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-11-06 15:31:46 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-11-06 15:31:46 +0100 |
| commit | 4966cc7a1e7adcfcab73f63e3eba44a077b21029 (patch) | |
| tree | 77c28317002f3d7cbe2e0cef30c6f65a432395c0 /FL/Fl.H | |
| parent | 87f9a6f4d614b7061301c1fafb289d2f1d75acc4 (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.H | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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(); /** |
