diff options
author | Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com> | 2024-10-16 14:13:36 +0300 |
---|---|---|
committer | Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com> | 2024-10-18 19:04:19 +0300 |
commit | af6d260c178c4879d0eb11212bb7163408eb468e (patch) | |
tree | 36ad6b662e3be37dddd9bbeed79850e38fb8882d /modules | |
parent | 4631a617e5ab4ec5cc51dbc43609b269a43059d9 (diff) | |
download | redot-engine-af6d260c178c4879d0eb11212bb7163408eb468e.tar.gz |
Don't include `core/io/image.h` in `core/os/os.h`
`core/os/os.h` doesn't use `core/io/image.h`. It just brings
transitive dependencies. Lots of dependencies because `core/os/os.h`
is transitively included in almost every file of godot
Also added `core/io/image.h` into files^1 where `Ref<Image>` and `core/os/os.h`
were used to prevent obscure errors involving `Ref<Image>`
^1 except those which include `core/io/image_loader.h` or `core/io/image.h` by
corresponding .h file with the same name
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/basis_universal/image_compress_basisu.cpp | 1 | ||||
-rw-r--r-- | modules/tga/image_loader_tga.cpp | 1 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 1 | ||||
-rw-r--r-- | modules/tinyexr/image_saver_tinyexr.cpp | 1 | ||||
-rw-r--r-- | modules/tinyexr/image_saver_tinyexr.h | 2 |
5 files changed, 5 insertions, 1 deletions
diff --git a/modules/basis_universal/image_compress_basisu.cpp b/modules/basis_universal/image_compress_basisu.cpp index d48ea363a7..8ca5dba225 100644 --- a/modules/basis_universal/image_compress_basisu.cpp +++ b/modules/basis_universal/image_compress_basisu.cpp @@ -30,6 +30,7 @@ #include "image_compress_basisu.h" +#include "core/io/image.h" #include "core/os/os.h" #include "core/string/print_string.h" #include "servers/rendering_server.h" diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp index e2bb89811c..b205dbbbf2 100644 --- a/modules/tga/image_loader_tga.cpp +++ b/modules/tga/image_loader_tga.cpp @@ -32,6 +32,7 @@ #include "core/error/error_macros.h" #include "core/io/file_access_memory.h" +#include "core/io/image.h" #include "core/os/os.h" #include "core/string/print_string.h" diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index d964fd7627..2725a61a82 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -31,6 +31,7 @@ #include "video_stream_theora.h" #include "core/config/project_settings.h" +#include "core/io/image.h" #include "core/os/os.h" #include "scene/resources/image_texture.h" diff --git a/modules/tinyexr/image_saver_tinyexr.cpp b/modules/tinyexr/image_saver_tinyexr.cpp index 31c1e06dee..b0a977f647 100644 --- a/modules/tinyexr/image_saver_tinyexr.cpp +++ b/modules/tinyexr/image_saver_tinyexr.cpp @@ -31,6 +31,7 @@ #include "image_saver_tinyexr.h" #include "core/math/math_funcs.h" +#include "core/os/os.h" #include <zlib.h> // Should come before including tinyexr. diff --git a/modules/tinyexr/image_saver_tinyexr.h b/modules/tinyexr/image_saver_tinyexr.h index 058eeae58e..014c2f2e19 100644 --- a/modules/tinyexr/image_saver_tinyexr.h +++ b/modules/tinyexr/image_saver_tinyexr.h @@ -31,7 +31,7 @@ #ifndef IMAGE_SAVER_TINYEXR_H #define IMAGE_SAVER_TINYEXR_H -#include "core/os/os.h" +#include "core/io/image.h" Error save_exr(const String &p_path, const Ref<Image> &p_img, bool p_grayscale); Vector<uint8_t> save_exr_buffer(const Ref<Image> &p_img, bool p_grayscale); |