diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-15 13:46:42 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-15 13:46:42 +1000 |
commit | 699d75f881ad79e98f9400eeb4a7f86a749b1521 (patch) | |
tree | 24af01d6dce086e8f26cde2e57bc705d75387a43 /win32/PlatWin.cxx | |
parent | 9f2ab7100c117a73d562f81eb590f32f4641cf54 (diff) | |
download | scintilla-mirror-699d75f881ad79e98f9400eeb4a7f86a749b1521.tar.gz |
Feature [feature-requests:#1215]. Stop warning about virtual call in destructor.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 00b118c82..90433201e 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -513,6 +513,7 @@ class SurfaceGDI : public Surface { void BrushColor(ColourDesired back); void SetFont(Font &font_); + void Clear(); public: SurfaceGDI(); @@ -578,10 +579,10 @@ SurfaceGDI::SurfaceGDI() : } SurfaceGDI::~SurfaceGDI() { - Release(); + Clear(); } -void SurfaceGDI::Release() { +void SurfaceGDI::Clear() { if (penOld) { ::SelectObject(hdc, penOld); ::DeleteObject(pen); @@ -613,6 +614,10 @@ void SurfaceGDI::Release() { } } +void SurfaceGDI::Release() { + Clear(); +} + bool SurfaceGDI::Initialised() { return hdc != 0; } @@ -1066,6 +1071,7 @@ class SurfaceD2D : public Surface { float dpiScaleX; float dpiScaleY; + void Clear(); void SetFont(Font &font_); public: @@ -1147,10 +1153,10 @@ SurfaceD2D::SurfaceD2D() : } SurfaceD2D::~SurfaceD2D() { - Release(); + Clear(); } -void SurfaceD2D::Release() { +void SurfaceD2D::Clear() { if (pBrush) { pBrush->Release(); pBrush = 0; @@ -1167,6 +1173,10 @@ void SurfaceD2D::Release() { } } +void SurfaceD2D::Release() { + Clear(); +} + void SurfaceD2D::SetScale() { HDC hdcMeasure = ::CreateCompatibleDC(NULL); logPixelsY = ::GetDeviceCaps(hdcMeasure, LOGPIXELSY); |