diff options
| -rw-r--r-- | win32/PlatWin.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/PlatWin.h b/win32/PlatWin.h index 2ffc4a5fb..3db343587 100644 --- a/win32/PlatWin.h +++ b/win32/PlatWin.h @@ -81,6 +81,11 @@ struct Painter { explicit Painter(HWND hWnd_) noexcept : hWnd(hWnd_) { ::BeginPaint(hWnd, &ps); } + // Deleted so Painter objects can not be copied. + Painter(const Painter &) = delete; + Painter(Painter &&) = delete; + Painter &operator=(const Painter &) = delete; + Painter &operator=(Painter &&) = delete; ~Painter() { ::EndPaint(hWnd, &ps); } |
