loaders: explicit variable scope to improve portability

issue: https://github.com/godotengine/godot/pull/105093
This commit is contained in:
Hermet Park 2025-04-10 12:57:07 +09:00
parent 126265feb9
commit 55c0849746
3 changed files with 3 additions and 3 deletions

View file

@ -132,7 +132,7 @@ bool JpgLoader::read()
//determine the image format
TJPF format;
if (cs == ColorSpace::ARGB8888 || cs == ColorSpace::ARGB8888S) {
if (ImageLoader::cs == ColorSpace::ARGB8888 || ImageLoader::cs == ColorSpace::ARGB8888S) {
format = TJPF_BGRX;
surface.cs = ColorSpace::ARGB8888;
} else {

View file

@ -88,7 +88,7 @@ bool PngLoader::read()
if (w == 0 || h == 0) return false;
if (cs == ColorSpace::ARGB8888 || cs == ColorSpace::ARGB8888S) {
if (ImageLoader::cs == ColorSpace::ARGB8888 || ImageLoader::cs == ColorSpace::ARGB8888S) {
image->format = PNG_FORMAT_BGRA;
surface.cs = ColorSpace::ARGB8888S;
} else {

View file

@ -138,7 +138,7 @@ bool WebpLoader::read()
if (!data || w == 0 || h == 0) return false;
surface.cs = this->cs;
surface.cs = ImageLoader::cs;
TaskScheduler::request(this);