From fc43e988d090b1a4bc5150a2352e3e5738442259 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 3 Nov 2022 16:56:14 +0100 Subject: [PATCH] [cpp] Fix more warnings. --- spine-cpp/spine-cpp/src/spine/Atlas.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spine-cpp/spine-cpp/src/spine/Atlas.cpp b/spine-cpp/spine-cpp/src/spine/Atlas.cpp index 711a31078..dd2d182ec 100644 --- a/spine-cpp/spine-cpp/src/spine/Atlas.cpp +++ b/spine-cpp/spine-cpp/src/spine/Atlas.cpp @@ -108,21 +108,21 @@ struct SimpleString { while (isspace((unsigned char) *start) && start < end) start++; if (start == end) { - length = end - start; + length = (int)(end - start); return *this; } end--; while (((unsigned char) *end == '\r') && end >= start) end--; end++; - length = end - start; + length = (int)(end - start); return *this; } int indexOf(char needle) { char *c = start; while (c < end) { - if (*c == needle) return c - start; + if (*c == needle) return (int)(c - start); c++; } return -1; @@ -131,7 +131,7 @@ struct SimpleString { int indexOf(char needle, int at) { char *c = start + at; while (c < end) { - if (*c == needle) return c - start; + if (*c == needle) return (int)(c - start); c++; } return -1; @@ -150,7 +150,7 @@ struct SimpleString { SimpleString result; result.start = start + s; result.end = end; - result.length = result.end - result.start; + result.length = (int)(result.end - result.start); return result; } @@ -286,7 +286,7 @@ void Atlas::load(const char *begin, int length, const char *dir, bool createText } else { page->texturePath = String(path, true); } - page->index = _pages.size(); + page->index = (int)_pages.size(); _pages.add(page); } else { AtlasRegion *region = new (__FILE__, __LINE__) AtlasRegion();