From 01fc9aee6c47aa1a1c787c46469fa18c21d06c66 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Mon, 28 Apr 2025 16:05:13 -0500 Subject: [PATCH] Core: Modernize C headers with C++ equivalents --- .clang-tidy | 2 ++ core/extension/gdextension_interface.cpp | 2 -- core/extension/gdextension_interface.h | 7 ++++--- core/io/ip_address.cpp | 2 -- core/io/logger.h | 2 +- core/io/marshalls.cpp | 4 ++-- core/math/bvh_tree.h | 3 ++- core/math/convex_hull.cpp | 2 +- core/object/message_queue.cpp | 2 +- core/os/memory.cpp | 3 +-- core/os/memory.h | 1 - core/os/os.cpp | 2 +- core/os/os.h | 2 +- core/os/time.cpp | 2 +- core/string/string_builder.cpp | 2 -- core/templates/cowdata.h | 1 - core/templates/rid_owner.h | 2 +- core/typedefs.h | 1 + core/variant/binder_common.h | 2 +- core/version.h | 2 +- drivers/alsa/audio_driver_alsa.cpp | 2 +- drivers/alsamidi/midi_driver_alsamidi.cpp | 2 +- drivers/coremidi/midi_driver_coremidi.h | 2 +- drivers/d3d12/d3d12_godot_nir_bridge.h | 2 +- drivers/png/image_loader_png.cpp | 2 -- drivers/png/png_driver_common.cpp | 1 - drivers/unix/dir_access_unix.cpp | 7 +++---- drivers/unix/file_access_unix.cpp | 6 +++--- drivers/unix/file_access_unix.h | 2 +- drivers/unix/file_access_unix_pipe.cpp | 2 +- drivers/unix/file_access_unix_pipe.h | 2 +- drivers/unix/ip_unix.cpp | 2 -- drivers/unix/net_socket_unix.cpp | 7 +++---- drivers/unix/os_unix.cpp | 13 ++++++------- drivers/vulkan/godot_vulkan.h | 2 +- drivers/windows/dir_access_windows.cpp | 4 ++-- drivers/windows/file_access_windows.cpp | 4 ++-- drivers/windows/file_access_windows.h | 2 +- drivers/windows/ip_windows.cpp | 4 +--- drivers/winmidi/midi_driver_winmidi.h | 2 +- editor/animation_bezier_editor.cpp | 4 ++-- editor/editor_node.cpp | 2 +- modules/gltf/gltf_document.cpp | 4 ++-- modules/jolt_physics/jolt_globals.cpp | 2 +- modules/jolt_physics/jolt_project_settings.h | 2 +- .../jolt_physics/spaces/jolt_broad_phase_layer.h | 2 +- modules/jolt_physics/spaces/jolt_temp_allocator.h | 2 +- modules/jpg/image_loader_libjpeg_turbo.cpp | 2 -- modules/mono/interop_types.h | 3 --- modules/mono/utils/path_utils.cpp | 4 ++-- modules/mono/utils/string_utils.cpp | 4 ++-- modules/mono/utils/string_utils.h | 2 +- modules/text_server_adv/thorvg_svg_in_ot.cpp | 2 +- modules/text_server_fb/thorvg_svg_in_ot.cpp | 2 +- modules/upnp/upnp_miniupnp.cpp | 2 +- modules/webp/webp_common.cpp | 2 -- modules/webxr/godot_webxr.h | 2 -- modules/webxr/webxr_interface_js.cpp | 2 +- platform/android/audio_driver_opensl.cpp | 2 -- platform/android/dir_access_jandroid.h | 2 +- platform/android/export/export_plugin.cpp | 2 -- platform/android/file_access_android.h | 2 +- platform/ios/export/export_plugin.h | 1 - platform/ios/godot_ios.mm | 3 +-- platform/linuxbsd/crash_handler_linuxbsd.cpp | 4 ++-- platform/linuxbsd/freedesktop_screensaver.h | 2 +- platform/linuxbsd/godot_linuxbsd.cpp | 6 +++--- platform/linuxbsd/joypad_linux.cpp | 2 +- platform/linuxbsd/os_linuxbsd.cpp | 5 ++--- platform/linuxbsd/platform_config.h | 2 +- platform/linuxbsd/wayland/detect_prime_egl.cpp | 5 +---- platform/linuxbsd/wayland/display_server_wayland.h | 4 ++-- platform/linuxbsd/x11/detect_prime_x11.cpp | 3 +-- platform/linuxbsd/x11/display_server_x11.cpp | 7 +++---- platform/linuxbsd/x11/gl_manager_x11.cpp | 4 ++-- platform/linuxbsd/x11/gl_manager_x11_egl.cpp | 4 ++-- platform/macos/crash_handler_macos.mm | 5 ++--- platform/macos/dir_access_macos.mm | 2 +- platform/macos/gl_manager_macos_angle.mm | 4 ++-- platform/macos/gl_manager_macos_legacy.mm | 4 ++-- platform/macos/godot_main_macos.mm | 1 - platform/web/godot_audio.h | 5 ++--- platform/web/godot_js.h | 5 ++--- platform/web/godot_midi.h | 3 ++- platform/web/http_client_web.h | 2 -- platform/web/os_web.cpp | 2 +- platform/web/web_main.cpp | 2 +- platform/windows/console_wrapper_windows.cpp | 4 ++-- platform/windows/crash_handler_windows_signal.cpp | 2 +- platform/windows/display_server_windows.h | 2 +- platform/windows/gl_manager_windows_angle.cpp | 4 ++-- platform/windows/gl_manager_windows_native.cpp | 4 ++-- platform/windows/godot_windows.cpp | 4 ++-- platform/windows/os_windows.h | 2 +- platform/windows/tts_windows.h | 2 +- platform/windows/wgl_detect_version.cpp | 4 ++-- platform/windows/windows_terminal_logger.cpp | 2 +- scene/gui/tree.cpp | 2 +- servers/audio_server.cpp | 2 -- servers/rendering/renderer_rd/effects/fsr2.cpp | 2 +- .../renderer_rd/storage_rd/forward_id_storage.h | 2 +- 101 files changed, 126 insertions(+), 168 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 04c48cf8925..05b2f61a7a0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,6 +1,7 @@ Checks: - -* - cppcoreguidelines-pro-type-member-init + - modernize-deprecated-headers - modernize-redundant-void-arg - modernize-use-bool-literals - modernize-use-default-member-init @@ -14,6 +15,7 @@ FormatStyle: file CheckOptions: cppcoreguidelines-pro-type-member-init.IgnoreArrays: true cppcoreguidelines-pro-type-member-init.UseAssignment: true + modernize-deprecated-headers.CheckHeaderFile: true modernize-use-bool-literals.IgnoreMacros: false modernize-use-default-member-init.IgnoreMacros: false modernize-use-default-member-init.UseAssignment: true diff --git a/core/extension/gdextension_interface.cpp b/core/extension/gdextension_interface.cpp index 725475d9a7a..011c96a66d2 100644 --- a/core/extension/gdextension_interface.cpp +++ b/core/extension/gdextension_interface.cpp @@ -43,8 +43,6 @@ #include "core/variant/variant.h" #include "core/version.h" -#include - class CallableCustomExtension : public CallableCustom { void *userdata; void *token; diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index ecd40c862dd..470fc56d25f 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -34,15 +34,16 @@ * Together with the JSON file, you should be able to generate any binder. */ +#ifndef __cplusplus #include #include -#ifndef __cplusplus typedef uint32_t char32_t; typedef uint16_t char16_t; -#endif +#else +#include +#include -#ifdef __cplusplus extern "C" { #endif diff --git a/core/io/ip_address.cpp b/core/io/ip_address.cpp index 78b8a19f7a7..174bbb21fa8 100644 --- a/core/io/ip_address.cpp +++ b/core/io/ip_address.cpp @@ -34,8 +34,6 @@ IPAddress::operator Variant() const { return operator String(); }*/ -#include - IPAddress::operator String() const { if (wildcard) { return "*"; diff --git a/core/io/logger.h b/core/io/logger.h index dc46647a026..ae8884d8110 100644 --- a/core/io/logger.h +++ b/core/io/logger.h @@ -35,7 +35,7 @@ #include "core/string/ustring.h" #include "core/templates/vector.h" -#include +#include class RegEx; diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index c81aaecce1b..68456a76204 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -35,8 +35,8 @@ #include "core/object/script_language.h" #include "core/variant/container_type_validate.h" -#include -#include +#include +#include void EncodedObjectAsID::_bind_methods() { ClassDB::bind_method(D_METHOD("set_object_id", "id"), &EncodedObjectAsID::set_object_id); diff --git a/core/math/bvh_tree.h b/core/math/bvh_tree.h index 76e5c999310..d33b8608ec8 100644 --- a/core/math/bvh_tree.h +++ b/core/math/bvh_tree.h @@ -43,7 +43,8 @@ #include "core/math/vector3.h" #include "core/templates/local_vector.h" #include "core/templates/pooled_list.h" -#include + +#include #define BVHABB_CLASS BVH_ABB diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp index fbd367b97dc..9f8dccf5f0c 100644 --- a/core/math/convex_hull.cpp +++ b/core/math/convex_hull.cpp @@ -88,7 +88,7 @@ subject to the following restrictions: #endif #if defined(DEBUG_CONVEX_HULL) || defined(SHOW_ITERATIONS) -#include +#include #endif // Convex hull implementation based on Preparata and Hong diff --git a/core/object/message_queue.cpp b/core/object/message_queue.cpp index 673e60d68d2..eb2066ecf58 100644 --- a/core/object/message_queue.cpp +++ b/core/object/message_queue.cpp @@ -34,7 +34,7 @@ #include "core/object/class_db.h" #include "core/object/script_language.h" -#include +#include #ifdef DEV_ENABLED // Includes safety checks to ensure that a queue set as a thread singleton override diff --git a/core/os/memory.cpp b/core/os/memory.cpp index 446e8cc0ada..8ed6106d047 100644 --- a/core/os/memory.cpp +++ b/core/os/memory.cpp @@ -32,8 +32,7 @@ #include "core/templates/safe_refcount.h" -#include -#include +#include void *operator new(size_t p_size, const char *p_description) { return Memory::alloc_static(p_size, false); diff --git a/core/os/memory.h b/core/os/memory.h index 3e0bf88217f..7164a3e3fbc 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -33,7 +33,6 @@ #include "core/error/error_macros.h" #include "core/templates/safe_refcount.h" -#include #include // IWYU pragma: keep // `new` operators. #include diff --git a/core/os/os.cpp b/core/os/os.cpp index 57647409a35..c4828fe1275 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -37,7 +37,7 @@ #include "core/os/midi_driver.h" #include "core/version_generated.gen.h" -#include +#include #ifdef MINGW_ENABLED #define MINGW_STDTHREAD_REDUNDANCY_WARNING diff --git a/core/os/os.h b/core/os/os.h index 7d5589beb45..4ad91a77ea0 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -38,7 +38,7 @@ #include "core/templates/list.h" #include "core/templates/vector.h" -#include +#include class OS { static OS *singleton; diff --git a/core/os/time.cpp b/core/os/time.cpp index f25cc79cacd..90aeb75911a 100644 --- a/core/os/time.cpp +++ b/core/os/time.cpp @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "time.h" +#include "time.h" // NOLINT(modernize-deprecated-headers) False positive with C-Header of the same name. #include "core/os/os.h" diff --git a/core/string/string_builder.cpp b/core/string/string_builder.cpp index 91ac8a09bbc..47b23471291 100644 --- a/core/string/string_builder.cpp +++ b/core/string/string_builder.cpp @@ -30,8 +30,6 @@ #include "string_builder.h" -#include - StringBuilder &StringBuilder::append(const String &p_string) { if (p_string.is_empty()) { return *this; diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h index 5ffd5c9eff3..a0fdd3f716f 100644 --- a/core/templates/cowdata.h +++ b/core/templates/cowdata.h @@ -35,7 +35,6 @@ #include "core/templates/safe_refcount.h" #include "core/templates/span.h" -#include #include #include diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index a79b867fa83..02b26141ac2 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -37,7 +37,7 @@ #include "core/templates/rid.h" #include "core/templates/safe_refcount.h" -#include +#include #include // IWYU pragma: keep // Used in macro. #ifdef SANITIZERS_ENABLED diff --git a/core/typedefs.h b/core/typedefs.h index 104b2da179e..31183b7256a 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -50,6 +50,7 @@ static_assert(__cplusplus >= 201703L, "Minimum of C++17 required."); #include #include +#include #include // IWYU pragma: end_exports diff --git a/core/variant/binder_common.h b/core/variant/binder_common.h index 67b68d30b60..33ef0f00fef 100644 --- a/core/variant/binder_common.h +++ b/core/variant/binder_common.h @@ -40,7 +40,7 @@ #include "core/variant/variant.h" #include "core/variant/variant_internal.h" -#include +#include // Variant cannot define an implicit cast operator for every Object subclass, so the // casting is done here, to allow binding methods with parameters more specific than Object * diff --git a/core/version.h b/core/version.h index 03148d007c5..3b75052f107 100644 --- a/core/version.h +++ b/core/version.h @@ -32,7 +32,7 @@ #include "core/version_generated.gen.h" // IWYU pragma: export -#include +#include // NOLINT(modernize-deprecated-headers) FIXME: MinGW compilation fails when changing to C++ Header. // Copied from typedefs.h to stay lean. #ifndef _STR diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 6ee22b6eb59..960f0fb9ada 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -35,7 +35,7 @@ #include "core/config/project_settings.h" #include "core/os/os.h" -#include +#include #if defined(PULSEAUDIO_ENABLED) && defined(SOWRAP_ENABLED) extern "C" { diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp index 04b866007e8..8c61a1338ed 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.cpp +++ b/drivers/alsamidi/midi_driver_alsamidi.cpp @@ -34,7 +34,7 @@ #include "core/os/os.h" -#include +#include MIDIDriverALSAMidi::InputConnection::InputConnection(int p_device_index, snd_rawmidi_t *p_rawmidi) : diff --git a/drivers/coremidi/midi_driver_coremidi.h b/drivers/coremidi/midi_driver_coremidi.h index bfa88344a89..82e7b15ff40 100644 --- a/drivers/coremidi/midi_driver_coremidi.h +++ b/drivers/coremidi/midi_driver_coremidi.h @@ -37,7 +37,7 @@ #include "core/templates/vector.h" #import -#include +#include class MIDIDriverCoreMidi : public MIDIDriver { MIDIClientRef client = 0; diff --git a/drivers/d3d12/d3d12_godot_nir_bridge.h b/drivers/d3d12/d3d12_godot_nir_bridge.h index 5fd9db42cf2..d35e3cd7493 100644 --- a/drivers/d3d12/d3d12_godot_nir_bridge.h +++ b/drivers/d3d12/d3d12_godot_nir_bridge.h @@ -30,7 +30,7 @@ #pragma once -#include +#include #ifdef __cplusplus extern "C" { diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 902ece1b041..cdb707f8f1b 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -32,8 +32,6 @@ #include "drivers/png/png_driver_common.h" -#include - Error ImageLoaderPNG::load_image(Ref p_image, Ref f, BitField p_flags, float p_scale) { const uint64_t buffer_size = f->get_length(); Vector file_buffer; diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp index d66fd40d8db..bbb38eadd14 100644 --- a/drivers/png/png_driver_common.cpp +++ b/drivers/png/png_driver_common.cpp @@ -33,7 +33,6 @@ #include "core/config/engine.h" #include -#include namespace PNGDriverCommon { diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index fc63cc80cbb..b8a7e062cc7 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -37,14 +37,13 @@ #include "core/string/print_string.h" #include "core/templates/list.h" -#include #include -#include -#include -#include #include #include #include +#include +#include +#include #if __has_include() #include diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index 32d6d07258b..d70ec66d2f8 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -35,15 +35,15 @@ #include "core/os/os.h" #include "core/string/print_string.h" -#include #include #include #include #include +#include #if defined(TOOLS_ENABLED) -#include -#include +#include +#include #endif void FileAccessUnix::check_errors(bool p_write) const { diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h index 0860b370920..6e89be0e227 100644 --- a/drivers/unix/file_access_unix.h +++ b/drivers/unix/file_access_unix.h @@ -33,7 +33,7 @@ #include "core/io/file_access.h" #include "core/os/memory.h" -#include +#include #if defined(UNIX_ENABLED) diff --git a/drivers/unix/file_access_unix_pipe.cpp b/drivers/unix/file_access_unix_pipe.cpp index 7d32a1b4df0..b4f3cbd56d6 100644 --- a/drivers/unix/file_access_unix_pipe.cpp +++ b/drivers/unix/file_access_unix_pipe.cpp @@ -35,12 +35,12 @@ #include "core/os/os.h" #include "core/string/print_string.h" -#include #include #include #include #include #include +#include Error FileAccessUnixPipe::open_existing(int p_rfd, int p_wfd, bool p_blocking) { // Open pipe using handles created by pipe(fd) call in the OS.execute_with_pipe. diff --git a/drivers/unix/file_access_unix_pipe.h b/drivers/unix/file_access_unix_pipe.h index 4081f6d70c9..71960253074 100644 --- a/drivers/unix/file_access_unix_pipe.h +++ b/drivers/unix/file_access_unix_pipe.h @@ -33,7 +33,7 @@ #include "core/io/file_access.h" #include "core/os/memory.h" -#include +#include #if defined(UNIX_ENABLED) diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index d58dbced03b..b290b7cd3db 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -54,8 +54,6 @@ #include // Order is important on OpenBSD, leave as last. -#include - static IPAddress _sockaddr2ip(struct sockaddr *p_addr) { IPAddress ip; diff --git a/drivers/unix/net_socket_unix.cpp b/drivers/unix/net_socket_unix.cpp index 06a1d42b254..87f52bbe025 100644 --- a/drivers/unix/net_socket_unix.cpp +++ b/drivers/unix/net_socket_unix.cpp @@ -34,19 +34,18 @@ #include "net_socket_unix.h" -#include #include #include #include #include #include -#include -#include -#include #include #include #include #include +#include +#include +#include #ifdef WEB_ENABLED #include diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index a78a87bbdb5..814f4e09db1 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -69,19 +69,18 @@ #endif #include -#include #include -#include -#include -#include -#include -#include #include #include #include #include -#include #include +#include +#include +#include +#include +#include +#include #ifndef RTLD_DEEPBIND #define RTLD_DEEPBIND 0 diff --git a/drivers/vulkan/godot_vulkan.h b/drivers/vulkan/godot_vulkan.h index d2e3bdd335e..b665cddd6f3 100644 --- a/drivers/vulkan/godot_vulkan.h +++ b/drivers/vulkan/godot_vulkan.h @@ -33,7 +33,7 @@ #ifdef USE_VOLK #include #else -#include +#include #define VK_NO_STDINT_H #include #endif diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 141d20102b5..8a93f902337 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -38,8 +38,8 @@ #include "core/os/os.h" #include "core/string/print_string.h" -#include -#include +#include +#include #define WIN32_LEAN_AND_MEAN #include diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index c7f7ddd7201..ff0c5bcbdb9 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -41,12 +41,12 @@ #define WIN32_LEAN_AND_MEAN #include -#include #include #include #include #include -#include +#include +#include #ifdef _MSC_VER #define S_ISREG(m) ((m) & _S_IFREG) diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h index 706fcd0c9d3..7d78518b2db 100644 --- a/drivers/windows/file_access_windows.h +++ b/drivers/windows/file_access_windows.h @@ -35,7 +35,7 @@ #include "core/io/file_access.h" #include "core/os/memory.h" -#include +#include class FileAccessWindows : public FileAccess { GDSOFTCLASS(FileAccessWindows, FileAccess); diff --git a/drivers/windows/ip_windows.cpp b/drivers/windows/ip_windows.cpp index 4ff368d3f45..60f2378ee12 100644 --- a/drivers/windows/ip_windows.cpp +++ b/drivers/windows/ip_windows.cpp @@ -39,9 +39,7 @@ #include -#include - -#include +#include static IPAddress _sockaddr2ip(struct sockaddr *p_addr) { IPAddress ip; diff --git a/drivers/winmidi/midi_driver_winmidi.h b/drivers/winmidi/midi_driver_winmidi.h index cfda2e96249..833f1123a13 100644 --- a/drivers/winmidi/midi_driver_winmidi.h +++ b/drivers/winmidi/midi_driver_winmidi.h @@ -35,7 +35,7 @@ #include "core/os/midi_driver.h" #include "core/templates/vector.h" -#include +#include #define WIN32_LEAN_AND_MEAN #include diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 2771bbc6d4a..e72f2ee1f65 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -40,7 +40,7 @@ #include "scene/gui/view_panner.h" #include "scene/resources/text_line.h" -#include +#include float AnimationBezierTrackEdit::_bezier_h_to_pixel(float p_h) { float h = p_h; @@ -1578,7 +1578,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { } if (scaling_selection && mb.is_valid() && !read_only && !mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) { - if (abs(scaling_selection_scale.x - 1) > CMP_EPSILON || abs(scaling_selection_scale.y - 1) > CMP_EPSILON) { + if (std::abs(scaling_selection_scale.x - 1) > CMP_EPSILON || std::abs(scaling_selection_scale.y - 1) > CMP_EPSILON) { // Scale it. EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); undo_redo->create_action(TTR("Scale Bezier Points")); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f3931147c5b..23c5860cb5e 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -180,7 +180,7 @@ #include "editor/gui/touch_actions_panel.h" #endif // ANDROID_ENABLED -#include +#include EditorNode *EditorNode::singleton = nullptr; diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 928beafd455..8b3bf8f6af1 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -77,8 +77,8 @@ #define GLTF_IMPORT_DISCARD_MESHES_AND_MATERIALS 32 #define GLTF_IMPORT_FORCE_DISABLE_MESH_COMPRESSION 64 -#include -#include +#include +#include constexpr int COMPONENT_COUNT_FOR_ACCESSOR_TYPE[7] = { 1, 2, 3, 4, 4, 9, 16 diff --git a/modules/jolt_physics/jolt_globals.cpp b/modules/jolt_physics/jolt_globals.cpp index e3e9fb19d08..53f1fef9510 100644 --- a/modules/jolt_physics/jolt_globals.cpp +++ b/modules/jolt_physics/jolt_globals.cpp @@ -42,7 +42,7 @@ #include "Jolt/RegisterTypes.h" -#include +#include void *jolt_alloc(size_t p_size) { return Memory::alloc_static(p_size); diff --git a/modules/jolt_physics/jolt_project_settings.h b/modules/jolt_physics/jolt_project_settings.h index 52d9eddccb4..afda6242657 100644 --- a/modules/jolt_physics/jolt_project_settings.h +++ b/modules/jolt_physics/jolt_project_settings.h @@ -30,7 +30,7 @@ #pragma once -#include +#include enum JoltJointWorldNode : int { JOLT_JOINT_WORLD_NODE_A, diff --git a/modules/jolt_physics/spaces/jolt_broad_phase_layer.h b/modules/jolt_physics/spaces/jolt_broad_phase_layer.h index 6ebb3c52bbf..986ed295374 100644 --- a/modules/jolt_physics/spaces/jolt_broad_phase_layer.h +++ b/modules/jolt_physics/spaces/jolt_broad_phase_layer.h @@ -34,7 +34,7 @@ #include "Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h" -#include +#include namespace JoltBroadPhaseLayer { diff --git a/modules/jolt_physics/spaces/jolt_temp_allocator.h b/modules/jolt_physics/spaces/jolt_temp_allocator.h index 5f6017f6530..f6fe47ebf4e 100644 --- a/modules/jolt_physics/spaces/jolt_temp_allocator.h +++ b/modules/jolt_physics/spaces/jolt_temp_allocator.h @@ -34,7 +34,7 @@ #include "Jolt/Core/TempAllocator.h" -#include +#include class JoltTempAllocator final : public JPH::TempAllocator { uint64_t capacity = 0; diff --git a/modules/jpg/image_loader_libjpeg_turbo.cpp b/modules/jpg/image_loader_libjpeg_turbo.cpp index f4199d713cf..d078d2f370c 100644 --- a/modules/jpg/image_loader_libjpeg_turbo.cpp +++ b/modules/jpg/image_loader_libjpeg_turbo.cpp @@ -32,8 +32,6 @@ #include -#include - Error jpeg_turbo_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p_buffer_len) { tjhandle tj_instance = tj3Init(TJINIT_DECOMPRESS); if (tj_instance == NULL) { diff --git a/modules/mono/interop_types.h b/modules/mono/interop_types.h index 3a2cc9c5d68..90c024ff6cd 100644 --- a/modules/mono/interop_types.h +++ b/modules/mono/interop_types.h @@ -36,9 +36,6 @@ extern "C" { #endif -#include -#include - // This is taken from the old GDNative, which was removed. #define GODOT_VARIANT_SIZE (sizeof(real_t) * 4 + sizeof(int64_t)) diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp index 9c68efe5275..4f9578db994 100644 --- a/modules/mono/utils/path_utils.cpp +++ b/modules/mono/utils/path_utils.cpp @@ -35,7 +35,7 @@ #include "core/io/file_access.h" #include "core/os/os.h" -#include +#include #ifdef WINDOWS_ENABLED #define WIN32_LEAN_AND_MEAN @@ -43,8 +43,8 @@ #define ENV_PATH_SEP ";" #else -#include #include +#include #define ENV_PATH_SEP ":" #endif diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp index cc239e7b60e..e679abc956d 100644 --- a/modules/mono/utils/string_utils.cpp +++ b/modules/mono/utils/string_utils.cpp @@ -32,8 +32,8 @@ #include "core/io/file_access.h" -#include -#include +#include +#include namespace { diff --git a/modules/mono/utils/string_utils.h b/modules/mono/utils/string_utils.h index e7b4c78642b..a0d7d044d53 100644 --- a/modules/mono/utils/string_utils.h +++ b/modules/mono/utils/string_utils.h @@ -33,7 +33,7 @@ #include "core/string/ustring.h" #include "core/variant/variant.h" -#include +#include String sformat(const String &p_text, const String &p1 = String(), const String &p2 = String(), const String &p3 = String(), const String &p4 = String(), const String &p5 = String(), const String &p6 = String()); diff --git a/modules/text_server_adv/thorvg_svg_in_ot.cpp b/modules/text_server_adv/thorvg_svg_in_ot.cpp index 51fa264ff7e..03be08e5e5f 100644 --- a/modules/text_server_adv/thorvg_svg_in_ot.cpp +++ b/modules/text_server_adv/thorvg_svg_in_ot.cpp @@ -60,7 +60,7 @@ using namespace godot; #include #include -#include +#include FT_Error tvg_svg_in_ot_init(FT_Pointer *p_state) { *p_state = memnew(TVG_State); diff --git a/modules/text_server_fb/thorvg_svg_in_ot.cpp b/modules/text_server_fb/thorvg_svg_in_ot.cpp index 51fa264ff7e..03be08e5e5f 100644 --- a/modules/text_server_fb/thorvg_svg_in_ot.cpp +++ b/modules/text_server_fb/thorvg_svg_in_ot.cpp @@ -60,7 +60,7 @@ using namespace godot; #include #include -#include +#include FT_Error tvg_svg_in_ot_init(FT_Pointer *p_state) { *p_state = memnew(TVG_State); diff --git a/modules/upnp/upnp_miniupnp.cpp b/modules/upnp/upnp_miniupnp.cpp index f4a8cdc85be..e32c19a3bb5 100644 --- a/modules/upnp/upnp_miniupnp.cpp +++ b/modules/upnp/upnp_miniupnp.cpp @@ -37,7 +37,7 @@ #include #include -#include +#include void UPNPMiniUPNP::make_default() { UPNP::_create = UPNPMiniUPNP::_create; diff --git a/modules/webp/webp_common.cpp b/modules/webp/webp_common.cpp index 11c86238749..9554405d6fa 100644 --- a/modules/webp/webp_common.cpp +++ b/modules/webp/webp_common.cpp @@ -35,8 +35,6 @@ #include #include -#include - namespace WebPCommon { Vector _webp_lossy_pack(const Ref &p_image, float p_quality) { ERR_FAIL_COND_V(p_image.is_null() || p_image->is_empty(), Vector()); diff --git a/modules/webxr/godot_webxr.h b/modules/webxr/godot_webxr.h index c6537ff027c..f7e7794c24f 100644 --- a/modules/webxr/godot_webxr.h +++ b/modules/webxr/godot_webxr.h @@ -34,8 +34,6 @@ extern "C" { #endif -#include - enum WebXRInputEvent { WEBXR_INPUT_EVENT_SELECTSTART, WEBXR_INPUT_EVENT_SELECTEND, diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index cf11dcc9ded..7bac468634d 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -45,7 +45,7 @@ #include "servers/xr/xr_hand_tracker.h" #include -#include +#include void _emwebxr_on_session_supported(char *p_session_mode, int p_supported) { XRServer *xr_server = XRServer::get_singleton(); diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp index ef9c51db079..8455a933979 100644 --- a/platform/android/audio_driver_opensl.cpp +++ b/platform/android/audio_driver_opensl.cpp @@ -30,8 +30,6 @@ #include "audio_driver_opensl.h" -#include - #define MAX_NUMBER_INTERFACES 3 #define MAX_NUMBER_OUTPUT_DEVICES 6 diff --git a/platform/android/dir_access_jandroid.h b/platform/android/dir_access_jandroid.h index 1d85ee13811..7787f47cd33 100644 --- a/platform/android/dir_access_jandroid.h +++ b/platform/android/dir_access_jandroid.h @@ -35,7 +35,7 @@ #include "core/io/dir_access.h" #include "drivers/unix/dir_access_unix.h" -#include +#include /// Android implementation of the DirAccess interface used to provide access to /// ACCESS_FILESYSTEM and ACCESS_RESOURCES directory resources. diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index d2dc0177fe2..eac64d56423 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -61,8 +61,6 @@ #include "../os_android.h" #endif -#include - static const char *ANDROID_PERMS[] = { "ACCESS_CHECKIN_PROPERTIES", "ACCESS_COARSE_LOCATION", diff --git a/platform/android/file_access_android.h b/platform/android/file_access_android.h index 2d5744e810a..d6c63f883cf 100644 --- a/platform/android/file_access_android.h +++ b/platform/android/file_access_android.h @@ -35,7 +35,7 @@ #include #include #include -#include +#include class FileAccessAndroid : public FileAccess { GDSOFTCLASS(FileAccessAndroid, FileAccess); diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h index b2268c3731e..8e2e0f1ca9a 100644 --- a/platform/ios/export/export_plugin.h +++ b/platform/ios/export/export_plugin.h @@ -45,7 +45,6 @@ #include "main/splash.gen.h" #include "scene/resources/image_texture.h" -#include #include // Optional environment variables for defining confidential information. If any diff --git a/platform/ios/godot_ios.mm b/platform/ios/godot_ios.mm index 9d35d433441..42b9658fbf9 100644 --- a/platform/ios/godot_ios.mm +++ b/platform/ios/godot_ios.mm @@ -33,9 +33,8 @@ #include "core/string/ustring.h" #include "main/main.h" -#include -#include #include +#include static OS_IOS *os = nullptr; diff --git a/platform/linuxbsd/crash_handler_linuxbsd.cpp b/platform/linuxbsd/crash_handler_linuxbsd.cpp index 7258659c003..3a3420ca55f 100644 --- a/platform/linuxbsd/crash_handler_linuxbsd.cpp +++ b/platform/linuxbsd/crash_handler_linuxbsd.cpp @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include static void handle_crash(int sig) { signal(SIGSEGV, SIG_DFL); diff --git a/platform/linuxbsd/freedesktop_screensaver.h b/platform/linuxbsd/freedesktop_screensaver.h index d00a7208533..806b94d5b1c 100644 --- a/platform/linuxbsd/freedesktop_screensaver.h +++ b/platform/linuxbsd/freedesktop_screensaver.h @@ -32,7 +32,7 @@ #ifdef DBUS_ENABLED -#include +#include class FreeDesktopScreenSaver { private: diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp index b0880c86b80..9a4372e61da 100644 --- a/platform/linuxbsd/godot_linuxbsd.cpp +++ b/platform/linuxbsd/godot_linuxbsd.cpp @@ -32,10 +32,10 @@ #include "main/main.h" -#include -#include -#include #include +#include +#include +#include #if defined(SANITIZERS_ENABLED) #include diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp index d109f230c15..9cd19d441c4 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -35,10 +35,10 @@ #include "core/os/os.h" #include -#include #include #include #include +#include #ifdef UDEV_ENABLED #ifdef SOWRAP_ENABLED diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp index 002ca10439c..8b02d089e22 100644 --- a/platform/linuxbsd/os_linuxbsd.cpp +++ b/platform/linuxbsd/os_linuxbsd.cpp @@ -68,13 +68,12 @@ #endif #include -#include -#include -#include #include #include #include #include +#include +#include #if __has_include() #include diff --git a/platform/linuxbsd/platform_config.h b/platform/linuxbsd/platform_config.h index 5f5b7da3c15..377be301c11 100644 --- a/platform/linuxbsd/platform_config.h +++ b/platform/linuxbsd/platform_config.h @@ -35,7 +35,7 @@ #endif #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) -#include // alloca +#include // alloca // FreeBSD and OpenBSD use pthread_set_name_np, while other platforms, // include NetBSD, use pthread_setname_np. NetBSD's version however requires // a different format, we handle this directly in thread_posix. diff --git a/platform/linuxbsd/wayland/detect_prime_egl.cpp b/platform/linuxbsd/wayland/detect_prime_egl.cpp index e24c03c869d..f5e94925b4f 100644 --- a/platform/linuxbsd/wayland/detect_prime_egl.cpp +++ b/platform/linuxbsd/wayland/detect_prime_egl.cpp @@ -36,13 +36,10 @@ #include "core/string/print_string.h" #include "core/string/ustring.h" -#include - -#include - #include #include #include +#include // To prevent shadowing warnings. #undef glGetString diff --git a/platform/linuxbsd/wayland/display_server_wayland.h b/platform/linuxbsd/wayland/display_server_wayland.h index bc798f955d8..a31ae20f079 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.h +++ b/platform/linuxbsd/wayland/display_server_wayland.h @@ -61,8 +61,8 @@ #include "core/input/input.h" #include "servers/display_server.h" -#include -#include +#include +#include #undef CursorShape diff --git a/platform/linuxbsd/x11/detect_prime_x11.cpp b/platform/linuxbsd/x11/detect_prime_x11.cpp index 5ec5a53b989..210202a6832 100644 --- a/platform/linuxbsd/x11/detect_prime_x11.cpp +++ b/platform/linuxbsd/x11/detect_prime_x11.cpp @@ -46,11 +46,10 @@ #include #endif -#include -#include #include #include #include +#include #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 67250c3d147..3875b958f47 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -58,13 +58,12 @@ #endif #include -#include -#include -#include -#include #include #include #include +#include +#include +#include #undef CursorShape #include diff --git a/platform/linuxbsd/x11/gl_manager_x11.cpp b/platform/linuxbsd/x11/gl_manager_x11.cpp index 738ebffa029..41c8cd704b7 100644 --- a/platform/linuxbsd/x11/gl_manager_x11.cpp +++ b/platform/linuxbsd/x11/gl_manager_x11.cpp @@ -34,9 +34,9 @@ #include "thirdparty/glad/glad/glx.h" -#include -#include #include +#include +#include #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 diff --git a/platform/linuxbsd/x11/gl_manager_x11_egl.cpp b/platform/linuxbsd/x11/gl_manager_x11_egl.cpp index 544684ebf1e..23ba8d8bb8a 100644 --- a/platform/linuxbsd/x11/gl_manager_x11_egl.cpp +++ b/platform/linuxbsd/x11/gl_manager_x11_egl.cpp @@ -32,8 +32,8 @@ #if defined(X11_ENABLED) && defined(GLES3_ENABLED) -#include -#include +#include +#include const char *GLManagerEGL_X11::_get_platform_extension_name() const { return "EGL_KHR_platform_x11"; diff --git a/platform/macos/crash_handler_macos.mm b/platform/macos/crash_handler_macos.mm index 82b8a56bb32..a71a50e4fd0 100644 --- a/platform/macos/crash_handler_macos.mm +++ b/platform/macos/crash_handler_macos.mm @@ -37,7 +37,6 @@ #include "core/version.h" #include "main/main.h" -#include #include #if defined(DEBUG_ENABLED) @@ -48,8 +47,8 @@ #include #include #include -#include -#include +#include +#include #import #import diff --git a/platform/macos/dir_access_macos.mm b/platform/macos/dir_access_macos.mm index 5c066bf08a1..39d3f5c154e 100644 --- a/platform/macos/dir_access_macos.mm +++ b/platform/macos/dir_access_macos.mm @@ -34,7 +34,7 @@ #include "core/config/project_settings.h" -#include +#include #import #import diff --git a/platform/macos/gl_manager_macos_angle.mm b/platform/macos/gl_manager_macos_angle.mm index 85b0693db89..b2380fd8d26 100644 --- a/platform/macos/gl_manager_macos_angle.mm +++ b/platform/macos/gl_manager_macos_angle.mm @@ -32,8 +32,8 @@ #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) -#include -#include +#include +#include #import diff --git a/platform/macos/gl_manager_macos_legacy.mm b/platform/macos/gl_manager_macos_legacy.mm index 3f73d6596ec..142fb7443bb 100644 --- a/platform/macos/gl_manager_macos_legacy.mm +++ b/platform/macos/gl_manager_macos_legacy.mm @@ -33,8 +33,8 @@ #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) #include -#include -#include +#include +#include GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wdeprecated-declarations") // OpenGL is deprecated in macOS 10.14. diff --git a/platform/macos/godot_main_macos.mm b/platform/macos/godot_main_macos.mm index ba341d1bb07..9a5b9fd7c21 100644 --- a/platform/macos/godot_main_macos.mm +++ b/platform/macos/godot_main_macos.mm @@ -32,7 +32,6 @@ #include "main/main.h" -#include #include #if defined(SANITIZERS_ENABLED) diff --git a/platform/web/godot_audio.h b/platform/web/godot_audio.h index 603f6db37db..6baf57c6b4a 100644 --- a/platform/web/godot_audio.h +++ b/platform/web/godot_audio.h @@ -30,13 +30,12 @@ #pragma once +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - extern int godot_audio_is_available(); extern int godot_audio_has_worklet(); extern int godot_audio_has_script_processor(); diff --git a/platform/web/godot_js.h b/platform/web/godot_js.h index 2b645aa36df..c29ccccd2b6 100644 --- a/platform/web/godot_js.h +++ b/platform/web/godot_js.h @@ -32,13 +32,12 @@ #define WASM_EXPORT __attribute__((visibility("default"))) +#include + #ifdef __cplusplus extern "C" { #endif -#include -#include - // Config extern void godot_js_config_locale_get(char *p_ptr, int p_ptr_max); extern void godot_js_config_canvas_id_get(char *p_ptr, int p_ptr_max); diff --git a/platform/web/godot_midi.h b/platform/web/godot_midi.h index 7c792b3ff9e..8674094cf41 100644 --- a/platform/web/godot_midi.h +++ b/platform/web/godot_midi.h @@ -30,11 +30,12 @@ #pragma once +#include + #ifdef __cplusplus extern "C" { #endif -#include extern int godot_js_webmidi_open_midi_inputs( void (*p_callback)(int p_size, const char **p_connected_input_names), void (*p_on_midi_message)(int p_device_index, int p_status, const uint8_t *p_data, int p_data_len), diff --git a/platform/web/http_client_web.h b/platform/web/http_client_web.h index d95d009240e..2ad0b47cf0a 100644 --- a/platform/web/http_client_web.h +++ b/platform/web/http_client_web.h @@ -36,8 +36,6 @@ extern "C" { #endif -#include - typedef enum { GODOT_JS_FETCH_STATE_REQUESTING = 0, GODOT_JS_FETCH_STATE_BODY = 1, diff --git a/platform/web/os_web.cpp b/platform/web/os_web.cpp index f3462e89866..a56a8080603 100644 --- a/platform/web/os_web.cpp +++ b/platform/web/os_web.cpp @@ -46,7 +46,7 @@ #include #include -#include +#include void OS_Web::alert(const String &p_alert, const String &p_title) { godot_js_display_alert(p_alert.utf8().get_data()); diff --git a/platform/web/web_main.cpp b/platform/web/web_main.cpp index 3487ed2ded6..55a8c678c59 100644 --- a/platform/web/web_main.cpp +++ b/platform/web/web_main.cpp @@ -43,7 +43,7 @@ #endif #include -#include +#include static OS_Web *os = nullptr; #ifndef PROXY_TO_PTHREAD_ENABLED diff --git a/platform/windows/console_wrapper_windows.cpp b/platform/windows/console_wrapper_windows.cpp index 03e77cb92cb..c72a8e236e9 100644 --- a/platform/windows/console_wrapper_windows.cpp +++ b/platform/windows/console_wrapper_windows.cpp @@ -31,8 +31,8 @@ #include #include -#include -#include +#include +#include #ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4 diff --git a/platform/windows/crash_handler_windows_signal.cpp b/platform/windows/crash_handler_windows_signal.cpp index dbc4edbedc2..0a5a2b25adc 100644 --- a/platform/windows/crash_handler_windows_signal.cpp +++ b/platform/windows/crash_handler_windows_signal.cpp @@ -40,8 +40,8 @@ #ifdef CRASH_HANDLER_EXCEPTION #include -#include #include +#include #include #include #include diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index b53da1dbbeb..94f7dcc6bf7 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -63,7 +63,7 @@ #include "native_menu_windows.h" #include -#include +#include #define WIN32_LEAN_AND_MEAN #include diff --git a/platform/windows/gl_manager_windows_angle.cpp b/platform/windows/gl_manager_windows_angle.cpp index c52564676fc..571c3cf6dbd 100644 --- a/platform/windows/gl_manager_windows_angle.cpp +++ b/platform/windows/gl_manager_windows_angle.cpp @@ -32,8 +32,8 @@ #if defined(WINDOWS_ENABLED) && defined(GLES3_ENABLED) -#include -#include +#include +#include #include diff --git a/platform/windows/gl_manager_windows_native.cpp b/platform/windows/gl_manager_windows_native.cpp index 88fe1d88ad3..c1d892297b7 100644 --- a/platform/windows/gl_manager_windows_native.cpp +++ b/platform/windows/gl_manager_windows_native.cpp @@ -38,8 +38,8 @@ #include "thirdparty/misc/nvapi_minimal.h" #include -#include -#include +#include +#include #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 diff --git a/platform/windows/godot_windows.cpp b/platform/windows/godot_windows.cpp index 8c5df46595c..3d6f973b331 100644 --- a/platform/windows/godot_windows.cpp +++ b/platform/windows/godot_windows.cpp @@ -32,8 +32,8 @@ #include "main/main.h" -#include -#include +#include +#include // For export templates, add a section; the exporter will patch it to enclose // the data appended to the executable (bundled PCK). diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index a7df3e07bb2..bc820facd56 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -50,7 +50,7 @@ #include #include -#include +#include #define WIN32_LEAN_AND_MEAN #include diff --git a/platform/windows/tts_windows.h b/platform/windows/tts_windows.h index ee1f20f2693..377c18f2b9e 100644 --- a/platform/windows/tts_windows.h +++ b/platform/windows/tts_windows.h @@ -38,8 +38,8 @@ #include #include -#include #include +#include #define WIN32_LEAN_AND_MEAN #include diff --git a/platform/windows/wgl_detect_version.cpp b/platform/windows/wgl_detect_version.cpp index f0892f8d499..c5208295609 100644 --- a/platform/windows/wgl_detect_version.cpp +++ b/platform/windows/wgl_detect_version.cpp @@ -40,8 +40,8 @@ #include #include -#include -#include +#include +#include #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 diff --git a/platform/windows/windows_terminal_logger.cpp b/platform/windows/windows_terminal_logger.cpp index 4e541b3ddef..899c6d00e13 100644 --- a/platform/windows/windows_terminal_logger.cpp +++ b/platform/windows/windows_terminal_logger.cpp @@ -34,7 +34,7 @@ #ifdef WINDOWS_ENABLED -#include +#include #define WIN32_LEAN_AND_MEAN #include diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 35b4cccf2bb..ee6001ccdf1 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -41,7 +41,7 @@ #include "scene/main/window.h" #include "scene/theme/theme_db.h" -#include +#include Size2 TreeItem::Cell::get_icon_size() const { if (icon.is_null()) { diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 46c325f26a9..0558c178a05 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -43,8 +43,6 @@ #include "servers/audio/audio_stream.h" #include "servers/audio/effects/audio_effect_compressor.h" -#include - #ifdef TOOLS_ENABLED #define MARK_EDITED set_edited(true); #else diff --git a/servers/rendering/renderer_rd/effects/fsr2.cpp b/servers/rendering/renderer_rd/effects/fsr2.cpp index 9e3cbfdc45e..f9c52454aac 100644 --- a/servers/rendering/renderer_rd/effects/fsr2.cpp +++ b/servers/rendering/renderer_rd/effects/fsr2.cpp @@ -36,7 +36,7 @@ using namespace RendererRD; #ifndef _MSC_VER -#include +#include #define wcscpy_s wcscpy #endif diff --git a/servers/rendering/renderer_rd/storage_rd/forward_id_storage.h b/servers/rendering/renderer_rd/storage_rd/forward_id_storage.h index b9d50a12e81..0d177abf79a 100644 --- a/servers/rendering/renderer_rd/storage_rd/forward_id_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/forward_id_storage.h @@ -30,7 +30,7 @@ #pragma once -#include +#include class RendererSceneRenderRD;