1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Fix -Wsign-compare warnings.

I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
This commit is contained in:
marxin
2019-02-21 20:57:39 +01:00
parent ce114e35dd
commit e5f665c718
21 changed files with 40 additions and 41 deletions

View File

@@ -106,7 +106,7 @@ StringName ResourceInteractiveLoaderBinary::_get_string() {
uint32_t id = f->get_32();
if (id & 0x80000000) {
uint32_t len = id & 0x7FFFFFFF;
if (len > str_buf.size()) {
if ((int)len > str_buf.size()) {
str_buf.resize(len);
}
if (len == 0)