diff options
Diffstat (limited to 'src/LineMarker.cxx')
| -rw-r--r-- | src/LineMarker.cxx | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 6bb9f4e9a..d80a3c78c 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -26,20 +26,17 @@ using namespace Scintilla;  #endif  void LineMarker::SetXPM(const char *textForm) { -	delete pxpm; -	pxpm = new XPM(textForm); +	pxpm.reset(new XPM(textForm));  	markType = SC_MARK_PIXMAP;  }  void LineMarker::SetXPM(const char *const *linesForm) { -	delete pxpm; -	pxpm = new XPM(linesForm); +	pxpm.reset(new XPM(linesForm));  	markType = SC_MARK_PIXMAP;  }  void LineMarker::SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage) { -	delete image; -	image = new RGBAImage(static_cast<int>(sizeRGBAImage.x), static_cast<int>(sizeRGBAImage.y), scale, pixelsRGBAImage); +	image.reset(new RGBAImage(static_cast<int>(sizeRGBAImage.x), static_cast<int>(sizeRGBAImage.y), scale, pixelsRGBAImage));  	markType = SC_MARK_RGBAIMAGE;  } @@ -74,7 +71,7 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C  }  void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const { -	if (customDraw != NULL) { +	if (customDraw) {  		customDraw(surface, rcWhole, fontForCharacter, tFold, marginStyle, this);  		return;  	}  | 
