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 | fc3c942d113a28089bffd94ff5addc79f3eef673 (patch) | |
| tree | c63ca598bdc4d3f534bf860b36527c1691345476 /win32/PlatWin.cxx | |
| parent | ba3dd815ce5596260f500d85728d943274beb2ed (diff) | |
| download | scintilla-mirror-fc3c942d113a28089bffd94ff5addc79f3eef673.tar.gz | |
Backport: Feature [feature-requests:#1215]. Stop warning about virtual call in destructor.
Backport of changeset 6690:2107e0144806.
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); |
