diff options
author | Zufu Liu <unknown> | 2023-04-09 09:56:07 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2023-04-09 09:56:07 +1000 |
commit | acac3c62dbe9c33548150d5c873c533d3271b779 (patch) | |
tree | e98c4992e17a3ddf1fe421d459a2655d69484506 | |
parent | 378ed7a5b2cf2f479aadeb4dd4238c798bd25c1f (diff) | |
download | scintilla-mirror-acac3c62dbe9c33548150d5c873c533d3271b779.tar.gz |
Feature [feature-requests:#1485] Follow rule-of-zero to omit standard methods.
-rw-r--r-- | win32/PlatWin.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
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<IUnknown *>(this); + *ppv = this; if (riid == __uuidof(IDWriteInlineObject)) - *ppv = static_cast<IDWriteInlineObject *>(this); + *ppv = this; if (!*ppv) return E_NOINTERFACE; return S_OK; |