aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/PlatCocoa.mm
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-15 13:46:42 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-15 13:46:42 +1000
commit699d75f881ad79e98f9400eeb4a7f86a749b1521 (patch)
tree24af01d6dce086e8f26cde2e57bc705d75387a43 /cocoa/PlatCocoa.mm
parent9f2ab7100c117a73d562f81eb590f32f4641cf54 (diff)
downloadscintilla-mirror-699d75f881ad79e98f9400eeb4a7f86a749b1521.tar.gz
Feature [feature-requests:#1215]. Stop warning about virtual call in destructor.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r--cocoa/PlatCocoa.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index c89a6f3aa..9c4d6a340 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -146,12 +146,12 @@ SurfaceImpl::SurfaceImpl() {
//--------------------------------------------------------------------------------------------------
SurfaceImpl::~SurfaceImpl() {
- Release();
+ Clear();
}
//--------------------------------------------------------------------------------------------------
-void SurfaceImpl::Release() {
+void SurfaceImpl::Clear() {
textLayout->setContext(nullptr);
if (bitmapData) {
bitmapData.reset();
@@ -169,6 +169,12 @@ void SurfaceImpl::Release() {
//--------------------------------------------------------------------------------------------------
+void SurfaceImpl::Release() {
+ Clear();
+}
+
+//--------------------------------------------------------------------------------------------------
+
bool SurfaceImpl::Initialised() {
// We are initalised if the graphics context is not null
return gc != NULL;// || port != NULL;