From fb8a1dbf48ba2fa656a24cdf9f5d412240fca25e Mon Sep 17 00:00:00 2001 From: hogliux Date: Mon, 24 Aug 2015 11:44:23 +0100 Subject: [PATCH] Fix some iOS build warnings --- modules/juce_core/native/juce_mac_Files.mm | 4 ++-- .../juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/juce_core/native/juce_mac_Files.mm b/modules/juce_core/native/juce_mac_Files.mm index afe4e7b8b5..2a263b7a8e 100644 --- a/modules/juce_core/native/juce_mac_Files.mm +++ b/modules/juce_core/native/juce_mac_Files.mm @@ -106,8 +106,7 @@ namespace FileHelpers return nsStringToJuce ([NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES) objectAtIndex: 0]); } - #endif - + #else static bool launchExecutable (const String& pathAndArguments) { const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), 0 }; @@ -128,6 +127,7 @@ namespace FileHelpers return true; } + #endif } bool File::isOnCDRomDrive() const diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 687ba1ef52..32f8c2487e 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -771,7 +771,7 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, const bool isDown, cons continue; CGPoint p = [touch locationInView: view]; - const Point pos (p.x, p.y); + const Point pos (static_cast (p.x), static_cast (p.y)); juce_lastMousePos = pos + getBounds (true).getPosition().toFloat(); const int64 time = getMouseTime (event); @@ -947,7 +947,7 @@ void UIViewComponentPeer::drawRect (CGRect r) CGContextClearRect (cg, CGContextGetClipBoundingBox (cg)); CGContextConcatCTM (cg, CGAffineTransformMake (1, 0, 0, -1, 0, getComponent().getHeight())); - CoreGraphicsContext g (cg, getComponent().getHeight(), [UIScreen mainScreen].scale); + CoreGraphicsContext g (cg, getComponent().getHeight(), static_cast ([UIScreen mainScreen].scale)); insideDrawRect = true; handlePaint (g);