diff options
-rw-r--r-- | cocoa/PlatCocoa.mm | 2 | ||||
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 4 | ||||
-rw-r--r-- | cocoa/ScintillaView.mm | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index a3d5ac17b..901ce4f7d 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1793,7 +1793,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 = ImageCreateFromRGBA(width, height, pixelsImage, false); - NSSize sz = {width, height}; + NSSize sz = {static_cast<CGFloat>(width), static_cast<CGFloat>(height)}; NSImage *img = [[[NSImage alloc] initWithSize: sz] autorelease]; NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; [img addRepresentation: bitmapRep]; diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 9dc572fc8..7e9823762 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1387,7 +1387,7 @@ bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selec { CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), vs.styles[STYLE_DEFAULT].characterSet); - CFRange rangeAll = {0, [data length]}; + CFRange rangeAll = {0, static_cast<CFIndex>([data length])}; CFIndex usedLen = 0; CFStringGetBytes((CFStringRef)data, rangeAll, encoding, '?', false, NULL, 0, &usedLen); @@ -1873,7 +1873,7 @@ int ScintillaCocoa::InsertText(NSString* input) { CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(), vs.styles[STYLE_DEFAULT].characterSet); - CFRange rangeAll = {0, [input length]}; + CFRange rangeAll = {0, static_cast<CFIndex>([input length])}; CFIndex usedLen = 0; CFStringGetBytes((CFStringRef)input, rangeAll, encoding, '?', false, NULL, 0, &usedLen); diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 5ab86ee80..542c51679 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -932,9 +932,9 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa int scrollerWidth = [NSScroller scrollerWidth]; NSSize size = [self frame].size; - NSRect hScrollerRect = {0, 0, size.width, scrollerWidth}; - NSRect vScrollerRect = {size.width - scrollerWidth, 0, scrollerWidth, size.height}; - NSRect barFrame = {0, size.height - scrollerWidth, size.width, scrollerWidth}; + NSRect hScrollerRect = {0, 0, size.width, static_cast<CGFloat>(scrollerWidth)}; + NSRect vScrollerRect = {size.width - scrollerWidth, 0, static_cast<CGFloat>(scrollerWidth), size.height}; + NSRect barFrame = {0, size.height - scrollerWidth, size.width, static_cast<CGFloat>(scrollerWidth)}; BOOL infoBarVisible = mInfoBar != nil && ![mInfoBar isHidden]; // Horizontal offset of the content. Almost always 0 unless the vertical scroller @@ -1009,7 +1009,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa } } - NSRect contentRect = {contentX, vScrollerRect.origin.y, size.width, size.height}; + NSRect contentRect = {static_cast<CGFloat>(contentX), vScrollerRect.origin.y, size.width, size.height}; [mContent setFrame: contentRect]; if (infoBarVisible) |