mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[cpp] Fix more warnings.
This commit is contained in:
parent
4a89b2b84d
commit
fc43e988d0
@ -108,21 +108,21 @@ struct SimpleString {
|
|||||||
while (isspace((unsigned char) *start) && start < end)
|
while (isspace((unsigned char) *start) && start < end)
|
||||||
start++;
|
start++;
|
||||||
if (start == end) {
|
if (start == end) {
|
||||||
length = end - start;
|
length = (int)(end - start);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
end--;
|
end--;
|
||||||
while (((unsigned char) *end == '\r') && end >= start)
|
while (((unsigned char) *end == '\r') && end >= start)
|
||||||
end--;
|
end--;
|
||||||
end++;
|
end++;
|
||||||
length = end - start;
|
length = (int)(end - start);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
int indexOf(char needle) {
|
int indexOf(char needle) {
|
||||||
char *c = start;
|
char *c = start;
|
||||||
while (c < end) {
|
while (c < end) {
|
||||||
if (*c == needle) return c - start;
|
if (*c == needle) return (int)(c - start);
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
@ -131,7 +131,7 @@ struct SimpleString {
|
|||||||
int indexOf(char needle, int at) {
|
int indexOf(char needle, int at) {
|
||||||
char *c = start + at;
|
char *c = start + at;
|
||||||
while (c < end) {
|
while (c < end) {
|
||||||
if (*c == needle) return c - start;
|
if (*c == needle) return (int)(c - start);
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
@ -150,7 +150,7 @@ struct SimpleString {
|
|||||||
SimpleString result;
|
SimpleString result;
|
||||||
result.start = start + s;
|
result.start = start + s;
|
||||||
result.end = end;
|
result.end = end;
|
||||||
result.length = result.end - result.start;
|
result.length = (int)(result.end - result.start);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ void Atlas::load(const char *begin, int length, const char *dir, bool createText
|
|||||||
} else {
|
} else {
|
||||||
page->texturePath = String(path, true);
|
page->texturePath = String(path, true);
|
||||||
}
|
}
|
||||||
page->index = _pages.size();
|
page->index = (int)_pages.size();
|
||||||
_pages.add(page);
|
_pages.add(page);
|
||||||
} else {
|
} else {
|
||||||
AtlasRegion *region = new (__FILE__, __LINE__) AtlasRegion();
|
AtlasRegion *region = new (__FILE__, __LINE__) AtlasRegion();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user