Disallow copy constructors/assignments.

For classes containing pointers/state that should not be copied.
This commit is contained in:
Jared Boone 2016-11-26 16:52:57 -08:00
parent 4eb0facacb
commit 46b3d9d087
8 changed files with 39 additions and 0 deletions

View file

@ -64,6 +64,8 @@ public:
Widget(const Widget&) = delete;
Widget(Widget&&) = delete;
Widget& operator=(const Widget&) = delete;
Widget& operator=(Widget&&) = delete;
virtual ~Widget() = default;
@ -229,6 +231,11 @@ public:
const Color background
);
Image(const Image&) = delete;
Image(Image&&) = delete;
Image& operator=(const Image&) = delete;
Image& operator=(Image&&) = delete;
void set_bitmap(const Bitmap* bitmap);
void set_foreground(const Color color);
void set_background(const Color color);