aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/PlatCocoa.mm
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2011-10-29 11:53:16 +1100
committernyamatongwe <nyamatongwe@gmail.com>2011-10-29 11:53:16 +1100
commit348e7c87b1671992f54a0f70e1d0877617d4d86e (patch)
treeb88dc8b4ff740dbf231218cd60a648f745dc060e /cocoa/PlatCocoa.mm
parent194c54f99bfef87c27e861d8ce0994e041045024 (diff)
downloadscintilla-mirror-348e7c87b1671992f54a0f70e1d0877617d4d86e.tar.gz
Fix warnings from Clang analyze about memory management.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r--cocoa/PlatCocoa.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index 02a000b39..7f0d86813 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -612,7 +612,7 @@ void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, C
}
}
-static CGImageRef ImageFromRGBA(int width, int height, const unsigned char *pixelsImage, bool invert) {
+static CGImageRef ImageCreateFromRGBA(int width, int height, const unsigned char *pixelsImage, bool invert) {
CGImageRef image = 0;
// Create an RGB color space.
@@ -666,7 +666,7 @@ static CGImageRef ImageFromRGBA(int width, int height, const unsigned char *pixe
}
void SurfaceImpl::DrawRGBAImage(PRectangle /* rc */, int width, int height, const unsigned char *pixelsImage) {
- CGImageRef image = ImageFromRGBA(width, height, pixelsImage, true);
+ CGImageRef image = ImageCreateFromRGBA(width, height, pixelsImage, true);
if (image) {
//CGContextSaveGState(gc);
//CGRect dst = PRectangleToCGRect(rc);
@@ -1794,7 +1794,7 @@ void ListBoxImpl::RegisterImage(int type, const char* xpm_data)
}
void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) {
- CGImageRef imageRef = ImageFromRGBA(width, height, pixelsImage, false);
+ CGImageRef imageRef = ImageCreateFromRGBA(width, height, pixelsImage, false);
NSSize sz = {width, height};
NSImage *img = [[NSImage alloc] initWithSize: sz];
[img autorelease];