From 8fc4709755b0c451d0e720881cad4bb0eb08b492 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 21 Jul 2013 16:24:00 +1000 Subject: Fix Clang C++11 compatibility. --- cocoa/ScintillaCocoa.mm | 4 ++-- cocoa/ScintillaView.mm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 3845bd5d0..b1d950163 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1625,7 +1625,7 @@ bool ScintillaCocoa::SetScrollingSize(void) { NSScrollView *scrollView = ScrollContainer(); NSClipView *clipView = [ScrollContainer() contentView]; NSRect clipRect = [clipView bounds]; - int docHeight = (cs.LinesDisplayed()+1) * vs.lineHeight; + CGFloat docHeight = (cs.LinesDisplayed()+1) * vs.lineHeight; if (!endAtLastLine) docHeight += (int([scrollView bounds].size.height / vs.lineHeight)-3) * vs.lineHeight; // Allow extra space so that last scroll position places whole line at top @@ -1634,7 +1634,7 @@ bool ScintillaCocoa::SetScrollingSize(void) { // Ensure all of clipRect covered by Scintilla drawing if (docHeight < clipRect.size.height) docHeight = clipRect.size.height; - int docWidth = scrollWidth; + CGFloat docWidth = scrollWidth; bool showHorizontalScroll = horizontalScrollBarVisible && (wrapState == eWrapNone); if (!showHorizontalScroll) diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 692ff3b5a..28b7914d5 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -1157,7 +1157,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa // Horizontal offset of the content. Almost always 0 unless the vertical scroller // is on the left side. - int contentX = 0; + CGFloat contentX = 0; NSRect scrollRect = {contentX, 0, size.width, size.height}; // Info bar frame. -- cgit v1.2.3