mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-26 10:24:14 +08:00
fixed all incorrect usages of NULL in place of a decimal number + removed compiler flags: -Wno-int-to-void-pointer-cast
and -Wno-null-conversion
This commit is contained in:
parent
1ed450b8e9
commit
91d470a358
@ -217,7 +217,7 @@ release_libs_dir64=(
|
||||
"$zlib_lib64"
|
||||
)
|
||||
|
||||
release_ignore_warn="-Wno-switch -Wno-int-to-void-pointer-cast -Wno-null-conversion"
|
||||
release_ignore_warn="-Wno-switch"
|
||||
common_defs="-DGNUC -DUTF_CPP_CPLUSPLUS=201703L -DCURL_STATICLIB"
|
||||
release_defs="$dbg_defs $common_defs"
|
||||
release_src=(
|
||||
|
@ -817,12 +817,12 @@ std::string Local_Storage::load_image_resized(std::string const& image_path, std
|
||||
unsigned char *img = stbi_load(image_path.c_str(), &width, &height, nullptr, 4);
|
||||
PRINT_DEBUG("Local_Storage::load_image_resized: \"%s\" %s\n", image_path.c_str(), (img == nullptr ? stbi_failure_reason() : "loaded"));
|
||||
if (img != nullptr) {
|
||||
stbir_resize_uint8(img, width, height, NULL, (unsigned char*)resized_img, resolution, resolution, NULL, 4);
|
||||
stbir_resize_uint8(img, width, height, 0, (unsigned char*)resized_img, resolution, resolution, 0, 4);
|
||||
resized_image = std::string(resized_img, resolution * resolution * 4);
|
||||
stbi_image_free(img);
|
||||
}
|
||||
} else if (image_data.length() > 0) {
|
||||
stbir_resize_uint8((unsigned char*)image_data.c_str(), 184, 184, NULL, (unsigned char*)resized_img, resolution, resolution, NULL, 4);
|
||||
stbir_resize_uint8((unsigned char*)image_data.c_str(), 184, 184, 0, (unsigned char*)resized_img, resolution, resolution, 0, 4);
|
||||
resized_image = std::string(resized_img, resolution * resolution * 4);
|
||||
}
|
||||
free(resized_img);
|
||||
|
Loading…
x
Reference in New Issue
Block a user