chore: eliminate compilation warnings under MSVC (#1170)

This commit is contained in:
leejet
2026-01-04 22:26:57 +08:00
committed by GitHub
parent 2cef4badb8
commit b90b1ee9cf
30 changed files with 420 additions and 461 deletions

View File

@@ -44,7 +44,7 @@ inline bool is_base64(unsigned char c) {
}
std::vector<uint8_t> base64_decode(const std::string& encoded_string) {
int in_len = encoded_string.size();
int in_len = static_cast<int>(encoded_string.size());
int i = 0;
int j = 0;
int in_ = 0;
@@ -617,7 +617,7 @@ int main(int argc, const char** argv) {
int img_h = height;
uint8_t* raw_pixels = load_image_from_memory(
reinterpret_cast<const char*>(bytes.data()),
bytes.size(),
static_cast<int>(bytes.size()),
img_w, img_h,
width, height, 3);
@@ -635,7 +635,7 @@ int main(int argc, const char** argv) {
int mask_h = height;
uint8_t* mask_raw = load_image_from_memory(
reinterpret_cast<const char*>(mask_bytes.data()),
mask_bytes.size(),
static_cast<int>(mask_bytes.size()),
mask_w, mask_h,
width, height, 1);
mask_image = {(uint32_t)mask_w, (uint32_t)mask_h, 1, mask_raw};