From acac3c62dbe9c33548150d5c873c533d3271b779 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 9 Apr 2023 09:56:07 +1000 Subject: Feature [feature-requests:#1485] Follow rule-of-zero to omit standard methods. --- win32/PlatWin.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 7fd6eea36..65e27b63a 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1954,7 +1954,7 @@ void SurfaceD2D::Copy(PRectangle rc, Point from, Surface &surfaceSource) { } } -class BlobInline : public IDWriteInlineObject { +class BlobInline final : public IDWriteInlineObject { XYPOSITION width; // IUnknown @@ -1980,12 +1980,6 @@ class BlobInline : public IDWriteInlineObject { public: BlobInline(XYPOSITION width_=0.0f) noexcept : width(width_) { } - // Defaulted so BlobInline objects can be copied. - BlobInline(const BlobInline &) = default; - BlobInline(BlobInline &&) = default; - BlobInline &operator=(const BlobInline &) = default; - BlobInline &operator=(BlobInline &&) = default; - virtual ~BlobInline() noexcept = default; }; /// Implement IUnknown @@ -1995,9 +1989,9 @@ STDMETHODIMP BlobInline::QueryInterface(REFIID riid, PVOID *ppv) { // Never called so not checked. *ppv = nullptr; if (riid == IID_IUnknown) - *ppv = static_cast(this); + *ppv = this; if (riid == __uuidof(IDWriteInlineObject)) - *ppv = static_cast(this); + *ppv = this; if (!*ppv) return E_NOINTERFACE; return S_OK; -- cgit v1.2.3