From bc065cc4d074470f6ec776f1bf1754da0f17d51e Mon Sep 17 00:00:00 2001 From: attilaz Date: Fri, 22 Sep 2017 17:44:15 +0200 Subject: [PATCH] Fix compilation on iOS (#1240) --- examples/20-nanovg/blendish.h | 4 ++-- examples/common/entry/entry_ios.mm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/20-nanovg/blendish.h b/examples/20-nanovg/blendish.h index 1afb1f5d0..15c2f3f02 100644 --- a/examples/20-nanovg/blendish.h +++ b/examples/20-nanovg/blendish.h @@ -2229,10 +2229,10 @@ int bndIconLabelTextPosition(NVGcontext *ctx, float x, float y, float w, float h ctx, x, y, rows[row].start, rows[row].end + 1, glyphs, BND_MAX_GLYPHS); int col, p = 0; for (col = 0; col < nglyphs && glyphs[col].x < px; ++col) - p = glyphs[col].str - label; + p = (int)(glyphs[col].str - label); // see if we should move one character further if (col > 0 && col < nglyphs && glyphs[col].x - px < px - glyphs[col - 1].x) - p = glyphs[col].str - label; + p = (int)(glyphs[col].str - label); return p; } diff --git a/examples/common/entry/entry_ios.mm b/examples/common/entry/entry_ios.mm index c37e420fd..1b32ba425 100644 --- a/examples/common/entry/entry_ios.mm +++ b/examples/common/entry/entry_ios.mm @@ -374,7 +374,7 @@ static void* m_device = NULL; int main(int _argc, const char* const* _argv) { NSAutoreleasePool* pool = [ [NSAutoreleasePool alloc] init]; - int exitCode = UIApplicationMain(_argc, _argv, @"UIApplication", NSStringFromClass([AppDelegate class]) ); + int exitCode = UIApplicationMain(_argc, (char**)_argv, @"UIApplication", NSStringFromClass([AppDelegate class]) ); [pool release]; return exitCode; }