mirror of
https://github.com/fltk/fltk.git
synced 2025-12-11 05:31:07 +08:00
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.
This commit is contained in:
6
FL/Fl.H
6
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();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user