mirror of
https://github.com/tiennm99/godot.git
synced 2026-06-29 09:08:21 +00:00
Fix signed and unsigned comparisons
The first in my quest to make Godot 3.x compile with -Werror on GCC7
This commit is contained in:
@@ -501,7 +501,7 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
|
||||
|
||||
size_t block_size = (p_len - step) > BLOCK_SIZE ? BLOCK_SIZE : (p_len - step);
|
||||
|
||||
for (int i = 0; i < block_size; i++) {
|
||||
for (uint32_t i = 0; i < block_size; i++) {
|
||||
strm_in[i] = p_buffer[step + i];
|
||||
}
|
||||
|
||||
@@ -523,14 +523,14 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
|
||||
//package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before);
|
||||
int start = file_buffer.size();
|
||||
file_buffer.resize(file_buffer.size() + bh.compressed_size);
|
||||
for (int i = 0; i < bh.compressed_size; i++)
|
||||
for (uint32_t i = 0; i < bh.compressed_size; i++)
|
||||
file_buffer[start + i] = strm_out[i];
|
||||
} else {
|
||||
bh.compressed_size = block_size;
|
||||
//package->store_buffer(strm_in.ptr(), block_size);
|
||||
int start = file_buffer.size();
|
||||
file_buffer.resize(file_buffer.size() + block_size);
|
||||
for (int i = 0; i < bh.compressed_size; i++)
|
||||
for (uint32_t i = 0; i < bh.compressed_size; i++)
|
||||
file_buffer[start + i] = strm_in[i];
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
|
||||
//package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before);
|
||||
int start = file_buffer.size();
|
||||
file_buffer.resize(file_buffer.size() + (strm.total_out - total_out_before));
|
||||
for (int i = 0; i < (strm.total_out - total_out_before); i++)
|
||||
for (uint32_t i = 0; i < (strm.total_out - total_out_before); i++)
|
||||
file_buffer[start + i] = strm_out[i];
|
||||
|
||||
deflateEnd(&strm);
|
||||
|
||||
Reference in New Issue
Block a user