diff --git a/.clangd b/.clangd index 95a1e90766c..3c9792eafbb 100644 --- a/.clangd +++ b/.clangd @@ -5,7 +5,6 @@ Diagnostics: Includes: IgnoreHeader: - - core/typedefs\.h # Our "main" header, featuring transitive includes; allow everywhere. - \.compat\.inc --- # Header-specific conditions. diff --git a/core/error/error_macros.cpp b/core/error/error_macros.cpp index a2369992e60..adf58f5b674 100644 --- a/core/error/error_macros.cpp +++ b/core/error/error_macros.cpp @@ -31,6 +31,7 @@ #include "error_macros.h" #include "core/io/logger.h" +#include "core/object/object_id.h" #include "core/os/os.h" #include "core/string/ustring.h" diff --git a/core/error/error_macros.h b/core/error/error_macros.h index 0cff9cb1c56..bedb84b4be8 100644 --- a/core/error/error_macros.h +++ b/core/error/error_macros.h @@ -30,12 +30,12 @@ #pragma once -#include "core/object/object_id.h" #include "core/typedefs.h" -#include // We'd normally use safe_refcount.h, but that would cause circular includes. +#include // IWYU pragma: keep // Used in macro. We'd normally use `safe_refcount.h`, but that would cause circular includes. class String; +class ObjectID; enum ErrorHandlerType { ERR_HANDLER_ERROR, diff --git a/core/io/image.cpp b/core/io/image.cpp index 51506258725..cdbb1187dd6 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -31,7 +31,6 @@ #include "image.h" #include "core/config/project_settings.h" -#include "core/error/error_list.h" #include "core/error/error_macros.h" #include "core/io/image_loader.h" #include "core/io/resource_loader.h" diff --git a/core/math/bvh.h b/core/math/bvh.h index f323ea173df..88cae1dbc77 100644 --- a/core/math/bvh.h +++ b/core/math/bvh.h @@ -51,6 +51,8 @@ // and pairable_mask is either 0 if static, or set to all if non static #include "bvh_tree.h" + +#include "core/math/geometry_3d.h" #include "core/os/mutex.h" #define BVHTREE_CLASS BVH_Tree diff --git a/core/math/bvh_abb.h b/core/math/bvh_abb.h index 8fa4d55e2e0..b96ea0859a0 100644 --- a/core/math/bvh_abb.h +++ b/core/math/bvh_abb.h @@ -30,6 +30,8 @@ #pragma once +#include "core/math/aabb.h" + // special optimized version of axis aligned bounding box template struct BVH_ABB { diff --git a/core/math/bvh_tree.h b/core/math/bvh_tree.h index 004eef7ffdc..76e5c999310 100644 --- a/core/math/bvh_tree.h +++ b/core/math/bvh_tree.h @@ -40,7 +40,6 @@ #include "core/math/aabb.h" #include "core/math/bvh_abb.h" -#include "core/math/geometry_3d.h" #include "core/math/vector3.h" #include "core/templates/local_vector.h" #include "core/templates/pooled_list.h" diff --git a/core/math/color_names.inc b/core/math/color_names.inc index a9162e369cc..969acc68380 100644 --- a/core/math/color_names.inc +++ b/core/math/color_names.inc @@ -36,6 +36,8 @@ // the old way leaked memory // this is not used as often as for more performance to make sense +#include "core/math/color.h" + struct NamedColor { const char *name; Color color; diff --git a/core/math/delaunay_3d.h b/core/math/delaunay_3d.h index f80499eaf58..122ff945f13 100644 --- a/core/math/delaunay_3d.h +++ b/core/math/delaunay_3d.h @@ -30,14 +30,13 @@ #pragma once -#include "core/io/file_access.h" #include "core/math/aabb.h" #include "core/math/projection.h" #include "core/math/vector3.h" +#include "core/templates/list.h" #include "core/templates/local_vector.h" #include "core/templates/oa_hash_map.h" #include "core/templates/vector.h" -#include "core/variant/variant.h" #include "thirdparty/misc/r128.h" diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h index a5c7d2b2eb2..9345375f0c7 100644 --- a/core/math/disjoint_set.h +++ b/core/math/disjoint_set.h @@ -30,7 +30,7 @@ #pragma once -#include "core/templates/rb_map.h" +#include "core/templates/hash_map.h" #include "core/templates/vector.h" /* This DisjointSet class uses Find with path compression and Union by rank */ diff --git a/core/math/geometry_3d.cpp b/core/math/geometry_3d.cpp index beb46aa371c..e02bb941d2c 100644 --- a/core/math/geometry_3d.cpp +++ b/core/math/geometry_3d.cpp @@ -30,6 +30,8 @@ #include "geometry_3d.h" +#include "core/templates/hash_map.h" + void Geometry3D::get_closest_points_between_segments(const Vector3 &p_p0, const Vector3 &p_p1, const Vector3 &p_q0, const Vector3 &p_q1, Vector3 &r_ps, Vector3 &r_qt) { // Based on David Eberly's Computation of Distance Between Line Segments algorithm. diff --git a/core/math/geometry_3d.h b/core/math/geometry_3d.h index f4ab7361814..c79cf74f771 100644 --- a/core/math/geometry_3d.h +++ b/core/math/geometry_3d.h @@ -32,7 +32,6 @@ #include "core/math/delaunay_3d.h" #include "core/math/face3.h" -#include "core/object/object.h" #include "core/templates/local_vector.h" #include "core/templates/vector.h" diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 47e5b7c65b7..116e85d5ad4 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -35,8 +35,6 @@ #include "core/math/random_pcg.h" #include "core/typedefs.h" -#include "thirdparty/misc/pcg.h" - #include #include diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index 34a0c021c7a..e6d7ee9d4e0 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -30,6 +30,9 @@ #include "quick_hull.h" +#include "core/templates/hash_map.h" +#include "core/templates/hash_set.h" + uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF; Error QuickHull::build(const Vector &p_points, Geometry3D::MeshData &r_mesh) { diff --git a/core/math/static_raycaster.h b/core/math/static_raycaster.h index 9a9fc6a6aa2..c3cb98523f9 100644 --- a/core/math/static_raycaster.h +++ b/core/math/static_raycaster.h @@ -32,16 +32,6 @@ #include "core/object/ref_counted.h" -#if !defined(__aligned) - -#if defined(_WIN32) && defined(_MSC_VER) -#define __aligned(...) __declspec(align(__VA_ARGS__)) -#else -#define __aligned(...) __attribute__((aligned(__VA_ARGS__))) -#endif - -#endif - class StaticRaycaster : public RefCounted { GDCLASS(StaticRaycaster, RefCounted) protected: @@ -49,7 +39,7 @@ protected: public: // Compatible with embree4 rays. - struct __aligned(16) Ray { + struct alignas(16) Ray { const static unsigned int INVALID_GEOMETRY_ID = ((unsigned int)-1); // from rtcore_common.h /*! Default construction does nothing. */ diff --git a/core/object/make_virtuals.py b/core/object/make_virtuals.py index 37ccbe1cfc1..d8ed11e2f20 100644 --- a/core/object/make_virtuals.py +++ b/core/object/make_virtuals.py @@ -211,8 +211,6 @@ def run(target, source, env): #include "core/object/script_instance.h" -#include - #ifdef TOOLS_ENABLED #define _GDVIRTUAL_TRACK(m_virtual, m_initialized)\\ if (_get_extension()->reloadable) {\\ diff --git a/core/os/memory.h b/core/os/memory.h index c71df8ff92f..9753d3c6481 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -33,9 +33,8 @@ #include "core/error/error_macros.h" #include "core/templates/safe_refcount.h" -#include #include -#include +#include // IWYU pragma: keep // `new` operators. #include class Memory { diff --git a/core/os/semaphore.h b/core/os/semaphore.h index dc17155be7f..e10bf20fa34 100644 --- a/core/os/semaphore.h +++ b/core/os/semaphore.h @@ -30,11 +30,8 @@ #pragma once -#include - #ifdef THREADS_ENABLED -#include "core/error/error_list.h" #include "core/typedefs.h" #ifdef DEBUG_ENABLED #include "core/error/error_macros.h" diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp index 87a2b163fdc..f6745ae3b13 100644 --- a/core/string/translation_po.cpp +++ b/core/string/translation_po.cpp @@ -30,9 +30,9 @@ #include "translation_po.h" +#ifdef DEBUG_TRANSLATION_PO #include "core/io/file_access.h" -#ifdef DEBUG_TRANSLATION_PO void TranslationPO::print_translation_map() { Error err; Ref file = FileAccess::open("translation_map_print_test.txt", FileAccess::WRITE, &err); diff --git a/core/string/ustring.h b/core/string/ustring.h index 5959e073939..a7ce37d4de1 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -32,7 +32,7 @@ // Note: _GODOT suffix added to header guard to avoid conflict with ICU header. -#include "core/string/char_utils.h" +#include "core/string/char_utils.h" // IWYU pragma: export #include "core/templates/cowdata.h" #include "core/templates/vector.h" #include "core/typedefs.h" diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h index 9bfbd2f6867..0d517adad07 100644 --- a/core/templates/cowdata.h +++ b/core/templates/cowdata.h @@ -38,7 +38,6 @@ #include #include #include -#include template class Vector; diff --git a/core/templates/hash_set.h b/core/templates/hash_set.h index 2b5f9414dec..14632a3b88d 100644 --- a/core/templates/hash_set.h +++ b/core/templates/hash_set.h @@ -30,11 +30,8 @@ #pragma once -#include "core/math/math_funcs.h" #include "core/os/memory.h" -#include "core/templates/hash_map.h" #include "core/templates/hashfuncs.h" -#include "core/templates/paged_allocator.h" /** * Implementation of Set using a bidi indexed hash map. diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h index ea7b8b5b6d4..901227cd2f8 100644 --- a/core/templates/local_vector.h +++ b/core/templates/local_vector.h @@ -277,7 +277,7 @@ public: } void sort() { - sort_custom<_DefaultComparator>(); + sort_custom>(); } void ordered_insert(T p_val) { diff --git a/core/templates/lru.h b/core/templates/lru.h index 4ab5c738491..1348c224d15 100644 --- a/core/templates/lru.h +++ b/core/templates/lru.h @@ -30,7 +30,6 @@ #pragma once -#include "core/math/math_funcs.h" #include "hash_map.h" #include "list.h" diff --git a/core/templates/oa_hash_map.h b/core/templates/oa_hash_map.h index 75204750494..3aedeb695e4 100644 --- a/core/templates/oa_hash_map.h +++ b/core/templates/oa_hash_map.h @@ -30,7 +30,6 @@ #pragma once -#include "core/math/math_funcs.h" #include "core/os/memory.h" #include "core/templates/hashfuncs.h" #include "core/templates/pair.h" diff --git a/core/templates/paged_allocator.h b/core/templates/paged_allocator.h index bc2374aeb49..697dc1e9d8a 100644 --- a/core/templates/paged_allocator.h +++ b/core/templates/paged_allocator.h @@ -37,7 +37,7 @@ #include "core/typedefs.h" #include -#include +#include // IWYU pragma: keep // Used in macro. template class PagedAllocator { diff --git a/core/templates/rid_owner.h b/core/templates/rid_owner.h index 39aee16703b..3ff34c407e4 100644 --- a/core/templates/rid_owner.h +++ b/core/templates/rid_owner.h @@ -38,7 +38,7 @@ #include "core/templates/safe_refcount.h" #include -#include +#include // IWYU pragma: keep // Used in macro. #ifdef SANITIZERS_ENABLED #ifdef __has_feature diff --git a/core/templates/safe_list.h b/core/templates/safe_list.h index 06baf77314a..768135ce969 100644 --- a/core/templates/safe_list.h +++ b/core/templates/safe_list.h @@ -36,7 +36,6 @@ #include #include #include -#include // Design goals for these classes: // - Accessing this list with an iterator will never result in a use-after free, diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h index 1ab781d9def..4173f756b46 100644 --- a/core/templates/safe_refcount.h +++ b/core/templates/safe_refcount.h @@ -37,7 +37,7 @@ #endif #include -#include +#include // IWYU pragma: keep // Used in macro. // Design goals for these classes: // - No automatic conversions or arithmetic operators, diff --git a/core/templates/search_array.h b/core/templates/search_array.h index d8361ce7129..13d76688d1d 100644 --- a/core/templates/search_array.h +++ b/core/templates/search_array.h @@ -30,9 +30,9 @@ #pragma once -#include +#include "core/typedefs.h" -template > +template > class SearchArray { public: Comparator compare; diff --git a/core/templates/sort_array.h b/core/templates/sort_array.h index 39ce8ea4622..6ef232fb489 100644 --- a/core/templates/sort_array.h +++ b/core/templates/sort_array.h @@ -39,18 +39,13 @@ break; \ } -template -struct _DefaultComparator { - _FORCE_INLINE_ bool operator()(const T &a, const T &b) const { return (a < b); } -}; - #ifdef DEBUG_ENABLED #define SORT_ARRAY_VALIDATE_ENABLED true #else #define SORT_ARRAY_VALIDATE_ENABLED false #endif -template , bool Validate = SORT_ARRAY_VALIDATE_ENABLED> +template , bool Validate = SORT_ARRAY_VALIDATE_ENABLED> class SortArray { enum { INTROSORT_THRESHOLD = 16 diff --git a/core/templates/vector.h b/core/templates/vector.h index edc33b7beb6..02c86ce8a86 100644 --- a/core/templates/vector.h +++ b/core/templates/vector.h @@ -39,14 +39,11 @@ */ #include "core/error/error_macros.h" -#include "core/os/memory.h" #include "core/templates/cowdata.h" #include "core/templates/search_array.h" #include "core/templates/sort_array.h" -#include #include -#include template class VectorWriteProxy { @@ -131,7 +128,7 @@ public: _FORCE_INLINE_ bool has(const T &p_val) const { return find(p_val) != -1; } void sort() { - sort_custom<_DefaultComparator>(); + sort_custom>(); } template @@ -147,7 +144,7 @@ public: } Size bsearch(const T &p_value, bool p_before) { - return bsearch_custom<_DefaultComparator>(p_value, p_before); + return bsearch_custom>(p_value, p_before); } template diff --git a/core/typedefs.h b/core/typedefs.h index 46e67cb733e..863f66d5993 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -30,22 +30,29 @@ #pragma once -#include - /** * Basic definitions and simple functions to be used everywhere. */ +// IWYU pragma: always_keep + +// Ensure that C++ standard is at least C++17. +// If on MSVC, also ensures that the `Zc:__cplusplus` flag is present. +static_assert(__cplusplus >= 201703L, "Minimum of C++17 required."); + +// IWYU pragma: begin_exports + // Include first in case the platform needs to pre-define/include some things. #include "platform_config.h" // Should be available everywhere. #include "core/error/error_list.h" + +#include #include #include -// Ensure that C++ standard is at least C++17. If on MSVC, also ensures that the `Zc:__cplusplus` flag is present. -static_assert(__cplusplus >= 201703L); +// IWYU pragma: end_exports // Turn argument to string constant: // https://gcc.gnu.org/onlinedocs/cpp/Stringizing.html#Stringizing diff --git a/core/version.h b/core/version.h index bced3267fae..cd7c5f7f98c 100644 --- a/core/version.h +++ b/core/version.h @@ -30,7 +30,7 @@ #pragma once -#include "core/version_generated.gen.h" +#include "core/version_generated.gen.h" // IWYU pragma: export #include diff --git a/drivers/d3d12/rendering_context_driver_d3d12.h b/drivers/d3d12/rendering_context_driver_d3d12.h index d8d1464b386..7c09a086dd6 100644 --- a/drivers/d3d12/rendering_context_driver_d3d12.h +++ b/drivers/d3d12/rendering_context_driver_d3d12.h @@ -30,7 +30,6 @@ #pragma once -#include "core/error/error_list.h" #include "core/os/mutex.h" #include "core/string/ustring.h" #include "core/templates/rid_owner.h" diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 70d10ecf102..ac2104a31a7 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -35,8 +35,6 @@ #include "core/config/project_settings.h" #include "core/os/os.h" -#include // INT32_MAX - #include #include diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index d8b8538b071..c6397c98c78 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -38,7 +38,7 @@ #include "core/object/script_language.h" #include "core/os/keyboard.h" #include "core/string/string_builder.h" -#include "core/version_generated.gen.h" +#include "core/version.h" #include "editor/doc_data_compressed.gen.h" #include "editor/editor_file_system.h" #include "editor/editor_main_screen.h" diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h index 0ff4ef771f6..7f0f5d1b304 100644 --- a/editor/editor_translation_parser.h +++ b/editor/editor_translation_parser.h @@ -30,7 +30,6 @@ #pragma once -#include "core/error/error_list.h" #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" #include "core/variant/typed_array.h" diff --git a/main/main.h b/main/main.h index 40a33a3deda..bc432d93157 100644 --- a/main/main.h +++ b/main/main.h @@ -30,7 +30,6 @@ #pragma once -#include "core/error/error_list.h" #include "core/os/thread.h" #include "core/typedefs.h" diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index d1ac826b6ab..f611331b0d4 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -59,8 +59,6 @@ #include "editor/editor_paths.h" #endif -#include - /////////////////////////// GDScriptNativeClass::GDScriptNativeClass(const StringName &p_name) { diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index c17649f2cbf..4c999c07e12 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -79,7 +79,6 @@ #include #include -#include constexpr int COMPONENT_COUNT_FOR_ACCESSOR_TYPE[7] = { 1, 2, 3, 4, 4, 9, 16 diff --git a/modules/jolt_physics/spaces/jolt_contact_listener_3d.h b/modules/jolt_physics/spaces/jolt_contact_listener_3d.h index 2b99d0fa263..ffef791a4b6 100644 --- a/modules/jolt_physics/spaces/jolt_contact_listener_3d.h +++ b/modules/jolt_physics/spaces/jolt_contact_listener_3d.h @@ -43,7 +43,6 @@ #include "Jolt/Physics/Collision/ContactListener.h" #include "Jolt/Physics/SoftBody/SoftBodyContactListener.h" -#include #include class JoltShapedObject3D; diff --git a/modules/jolt_physics/spaces/jolt_job_system.h b/modules/jolt_physics/spaces/jolt_job_system.h index ad8bc426bcf..a64f8d425e0 100644 --- a/modules/jolt_physics/spaces/jolt_job_system.h +++ b/modules/jolt_physics/spaces/jolt_job_system.h @@ -38,7 +38,6 @@ #include "Jolt/Core/FixedSizeFreeList.h" #include "Jolt/Core/JobSystemWithBarrier.h" -#include #include class JoltJobSystem final : public JPH::JobSystemWithBarrier { diff --git a/modules/jolt_physics/spaces/jolt_layers.h b/modules/jolt_physics/spaces/jolt_layers.h index c45cc3898be..59f49b5275e 100644 --- a/modules/jolt_physics/spaces/jolt_layers.h +++ b/modules/jolt_physics/spaces/jolt_layers.h @@ -38,8 +38,6 @@ #include "Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h" #include "Jolt/Physics/Collision/ObjectLayer.h" -#include - class JoltLayers final : public JPH::BroadPhaseLayerInterface, public JPH::ObjectLayerPairFilter, diff --git a/modules/jolt_physics/spaces/jolt_space_3d.h b/modules/jolt_physics/spaces/jolt_space_3d.h index 5137b4a849c..5edc6c0c051 100644 --- a/modules/jolt_physics/spaces/jolt_space_3d.h +++ b/modules/jolt_physics/spaces/jolt_space_3d.h @@ -44,8 +44,6 @@ #include "Jolt/Physics/Constraints/Constraint.h" #include "Jolt/Physics/PhysicsSystem.h" -#include - class JoltArea3D; class JoltBody3D; class JoltContactListener3D; diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 55c1a099025..7f29ac9c716 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -66,8 +66,6 @@ #include "editor/node_dock.h" #endif -#include - // Types that will be skipped over (in favor of their base types) when setting up instance bindings. // This must be a superset of `ignored_types` in bindings_generator.cpp. const Vector ignored_types = {}; diff --git a/modules/mono/mono_gd/gd_mono_cache.h b/modules/mono/mono_gd/gd_mono_cache.h index 6caec0b7379..bbf32e3c77d 100644 --- a/modules/mono/mono_gd/gd_mono_cache.h +++ b/modules/mono/mono_gd/gd_mono_cache.h @@ -41,8 +41,6 @@ #include "core/variant/dictionary.h" #include "core/variant/variant.h" -#include - class CSharpScript; namespace GDMonoCache { diff --git a/modules/multiplayer/scene_multiplayer.cpp b/modules/multiplayer/scene_multiplayer.cpp index 8ec89404ae8..4d6f044b0d4 100644 --- a/modules/multiplayer/scene_multiplayer.cpp +++ b/modules/multiplayer/scene_multiplayer.cpp @@ -37,8 +37,6 @@ #include "core/os/os.h" #endif -#include - #ifdef DEBUG_ENABLED _FORCE_INLINE_ void SceneMultiplayer::_profile_bandwidth(const String &p_what, int p_value) { if (EngineDebugger::is_profiling("multiplayer:bandwidth")) { diff --git a/modules/websocket/emws_peer.h b/modules/websocket/emws_peer.h index 88bad07c592..a1f869b6c65 100644 --- a/modules/websocket/emws_peer.h +++ b/modules/websocket/emws_peer.h @@ -35,7 +35,6 @@ #include "packet_buffer.h" #include "websocket_peer.h" -#include "core/error/error_list.h" #include "core/io/packet_peer.h" #include "core/templates/ring_buffer.h" diff --git a/modules/websocket/websocket_multiplayer_peer.h b/modules/websocket/websocket_multiplayer_peer.h index 1f769eb4bbe..0431a994984 100644 --- a/modules/websocket/websocket_multiplayer_peer.h +++ b/modules/websocket/websocket_multiplayer_peer.h @@ -32,7 +32,6 @@ #include "websocket_peer.h" -#include "core/error/error_list.h" #include "core/io/tcp_server.h" #include "core/templates/list.h" #include "scene/main/multiplayer_peer.h" diff --git a/modules/websocket/websocket_peer.h b/modules/websocket/websocket_peer.h index 7aae0d7d36e..b60b90916dd 100644 --- a/modules/websocket/websocket_peer.h +++ b/modules/websocket/websocket_peer.h @@ -31,7 +31,6 @@ #pragma once #include "core/crypto/crypto.h" -#include "core/error/error_list.h" #include "core/io/packet_peer.h" class WebSocketPeer : public PacketPeer { diff --git a/modules/websocket/wsl_peer.h b/modules/websocket/wsl_peer.h index 7af9e274ea0..6580173b5b0 100644 --- a/modules/websocket/wsl_peer.h +++ b/modules/websocket/wsl_peer.h @@ -36,7 +36,6 @@ #include "websocket_peer.h" #include "core/crypto/crypto_core.h" -#include "core/error/error_list.h" #include "core/io/stream_peer_tcp.h" #include diff --git a/platform/android/export/godot_plugin_config.h b/platform/android/export/godot_plugin_config.h index d5563681b53..1b69262c214 100644 --- a/platform/android/export/godot_plugin_config.h +++ b/platform/android/export/godot_plugin_config.h @@ -33,7 +33,6 @@ #ifndef DISABLE_DEPRECATED #include "core/config/project_settings.h" -#include "core/error/error_list.h" #include "core/io/config_file.h" #include "core/string/ustring.h" diff --git a/platform/android/java_godot_io_wrapper.cpp b/platform/android/java_godot_io_wrapper.cpp index 941995c74bd..fc36881fcb6 100644 --- a/platform/android/java_godot_io_wrapper.cpp +++ b/platform/android/java_godot_io_wrapper.cpp @@ -30,7 +30,6 @@ #include "java_godot_io_wrapper.h" -#include "core/error/error_list.h" #include "core/math/rect2.h" #include "core/variant/variant.h" diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h index 169b45453b7..b2268c3731e 100644 --- a/platform/ios/export/export_plugin.h +++ b/platform/ios/export/export_plugin.h @@ -40,7 +40,6 @@ #include "core/io/zip_io.h" #include "core/os/os.h" #include "core/templates/safe_refcount.h" -#include "core/version.h" #include "editor/editor_settings.h" #include "editor/export/editor_export_platform.h" #include "main/splash.gen.h" diff --git a/platform/ios/export/godot_plugin_config.h b/platform/ios/export/godot_plugin_config.h index 09dbaa1c0e3..13f60fc51f6 100644 --- a/platform/ios/export/godot_plugin_config.h +++ b/platform/ios/export/godot_plugin_config.h @@ -30,7 +30,6 @@ #pragma once -#include "core/error/error_list.h" #include "core/io/config_file.h" #include "core/string/ustring.h" diff --git a/platform/linuxbsd/x11/gl_manager_x11_egl.h b/platform/linuxbsd/x11/gl_manager_x11_egl.h index 527796fcc34..653707ea740 100644 --- a/platform/linuxbsd/x11/gl_manager_x11_egl.h +++ b/platform/linuxbsd/x11/gl_manager_x11_egl.h @@ -32,7 +32,6 @@ #if defined(X11_ENABLED) && defined(GLES3_ENABLED) -#include "core/error/error_list.h" #include "core/os/os.h" #include "core/templates/local_vector.h" #include "drivers/egl/egl_manager.h" diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h index 4f462b738c5..607d98da9d7 100644 --- a/platform/macos/export/export_plugin.h +++ b/platform/macos/export/export_plugin.h @@ -37,7 +37,6 @@ #include "core/io/marshalls.h" #include "core/io/resource_saver.h" #include "core/os/os.h" -#include "core/version.h" #include "editor/editor_settings.h" #include "editor/export/editor_export.h" diff --git a/platform/macos/gl_manager_macos_angle.h b/platform/macos/gl_manager_macos_angle.h index 7f511748de5..933ec1646c5 100644 --- a/platform/macos/gl_manager_macos_angle.h +++ b/platform/macos/gl_manager_macos_angle.h @@ -32,7 +32,6 @@ #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) -#include "core/error/error_list.h" #include "core/os/os.h" #include "core/templates/local_vector.h" #include "drivers/egl/egl_manager.h" diff --git a/platform/macos/gl_manager_macos_legacy.h b/platform/macos/gl_manager_macos_legacy.h index 17d51b04226..7188e052664 100644 --- a/platform/macos/gl_manager_macos_legacy.h +++ b/platform/macos/gl_manager_macos_legacy.h @@ -32,7 +32,6 @@ #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) -#include "core/error/error_list.h" #include "core/os/os.h" #include "core/templates/local_vector.h" #include "servers/display_server.h" diff --git a/platform/windows/gl_manager_windows_angle.h b/platform/windows/gl_manager_windows_angle.h index 933441a63dc..1ae6e8c1973 100644 --- a/platform/windows/gl_manager_windows_angle.h +++ b/platform/windows/gl_manager_windows_angle.h @@ -32,7 +32,6 @@ #if defined(WINDOWS_ENABLED) && defined(GLES3_ENABLED) -#include "core/error/error_list.h" #include "core/os/os.h" #include "core/templates/local_vector.h" #include "drivers/egl/egl_manager.h" diff --git a/platform/windows/gl_manager_windows_native.h b/platform/windows/gl_manager_windows_native.h index c6e889939b3..c4d66bfabf4 100644 --- a/platform/windows/gl_manager_windows_native.h +++ b/platform/windows/gl_manager_windows_native.h @@ -32,7 +32,6 @@ #if defined(WINDOWS_ENABLED) && defined(GLES3_ENABLED) -#include "core/error/error_list.h" #include "core/os/os.h" #include "core/templates/local_vector.h" #include "servers/display_server.h" diff --git a/scene/3d/lightmapper.h b/scene/3d/lightmapper.h index e29b89b512f..3476630c247 100644 --- a/scene/3d/lightmapper.h +++ b/scene/3d/lightmapper.h @@ -34,16 +34,6 @@ class Image; -#if !defined(__aligned) - -#if defined(_WIN32) && defined(_MSC_VER) -#define __aligned(...) __declspec(align(__VA_ARGS__)) -#else -#define __aligned(...) __attribute__((aligned(__VA_ARGS__))) -#endif - -#endif - class LightmapDenoiser : public RefCounted { GDCLASS(LightmapDenoiser, RefCounted) protected: @@ -61,7 +51,7 @@ protected: public: // Compatible with embree4 rays. - struct __aligned(16) Ray { + struct alignas(16) Ray { const static unsigned int INVALID_GEOMETRY_ID = ((unsigned int)-1); // from rtcore_common.h /*! Default construction does nothing. */ diff --git a/scene/main/node.cpp b/scene/main/node.cpp index addfaa1dc6c..c6f3bc7e7c3 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -43,8 +43,6 @@ #include "scene/resources/packed_scene.h" #include "viewport.h" -#include - int Node::orphan_node_count = 0; thread_local Node *Node::current_process_thread_group = nullptr; diff --git a/scene/resources/3d/importer_mesh.cpp b/scene/resources/3d/importer_mesh.cpp index 0f370050ea9..b1205829d3a 100644 --- a/scene/resources/3d/importer_mesh.cpp +++ b/scene/resources/3d/importer_mesh.cpp @@ -35,8 +35,6 @@ #include "core/math/random_pcg.h" #include "scene/resources/surface_tool.h" -#include - String ImporterMesh::validate_blend_shape_name(const String &p_name) { String name = p_name; const char *characters = ":"; diff --git a/scene/resources/3d/importer_mesh.h b/scene/resources/3d/importer_mesh.h index 4624f767d71..adc1bb30c83 100644 --- a/scene/resources/3d/importer_mesh.h +++ b/scene/resources/3d/importer_mesh.h @@ -36,8 +36,6 @@ #include "scene/resources/mesh.h" #include "scene/resources/navigation_mesh.h" -#include - // The following classes are used by importers instead of ArrayMesh and MeshInstance3D // so the data is not registered (hence, quality loss), importing happens faster and // its easier to modify before saving