aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2017-05-07 09:06:34 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2017-05-07 09:06:34 +1000
commite83b93832fa5d40d2543c8a967c256d9439fe041 (patch)
treedfd8021d17bba40882cddc97ba141e743b494cba /cocoa/ScintillaCocoa.mm
parent0f63b24bcd3e119783c163e4fc24fa94003040af (diff)
downloadscintilla-mirror-e83b93832fa5d40d2543c8a967c256d9439fe041.tar.gz
Use unique_ptr on Cocoa.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm5
1 files changed, 2 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 5c89ed765..64dffbd4f 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1844,7 +1844,7 @@ void ScintillaCocoa::PaintMargin(NSRect aRect)
PRectangle rc = NSRectToPRectangle(aRect);
rcPaint = rc;
- Surface *sw = Surface::Allocate(SC_TECHNOLOGY_DEFAULT);
+ std::unique_ptr<Surface> sw(Surface::Allocate(SC_TECHNOLOGY_DEFAULT));
if (sw)
{
CGContextSetAllowsAntialiasing(gc,
@@ -1855,9 +1855,8 @@ void ScintillaCocoa::PaintMargin(NSRect aRect)
vs.extraFontFlag == SC_EFF_QUALITY_DEFAULT ||
vs.extraFontFlag == SC_EFF_QUALITY_LCD_OPTIMIZED);
sw->Init(gc, wMargin.GetID());
- PaintSelMargin(sw, rc);
+ PaintSelMargin(sw.get(), rc);
sw->Release();
- delete sw;
}
}