aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2025-11-28 16:16:39 +1100
committerNeil <nyamatongwe@gmail.com>2025-11-28 16:16:39 +1100
commitdb155eee02ef6ae7d6a5d9567a1100b621a23190 (patch)
tree3378dc0c0e849dc7b8585c87c573363d0512aa31
parent47c094313ab711b785e41a08e55350e1d447fa04 (diff)
downloadscintilla-mirror-db155eee02ef6ae7d6a5d9567a1100b621a23190.tar.gz
Apply rule-of-5 since painter holds a resource.
-rw-r--r--win32/PlatWin.h5
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);
}