浏览代码

Apply iwyu suggestion in core.

Yufeng Ying 7 月之前
父节点
当前提交
be86ce3103
共有 68 个文件被更改,包括 7 次插入111 次删除
  1. 0 1
      core/config/engine.h
  2. 0 1
      core/config/project_settings.cpp
  3. 0 2
      core/core_bind.cpp
  4. 0 2
      core/core_bind.h
  5. 0 1
      core/core_constants.cpp
  6. 1 1
      core/core_constants.h
  7. 0 4
      core/crypto/crypto.cpp
  8. 0 1
      core/debugger/engine_debugger.h
  9. 0 1
      core/debugger/script_debugger.h
  10. 0 1
      core/input/shortcut.cpp
  11. 0 1
      core/io/config_file.cpp
  12. 0 3
      core/io/dtls_server.cpp
  13. 0 2
      core/io/file_access_compressed.cpp
  14. 0 3
      core/io/file_access_encrypted.cpp
  15. 0 2
      core/io/file_access_memory.cpp
  16. 0 2
      core/io/file_access_pack.cpp
  17. 0 1
      core/io/file_access_pack.h
  18. 0 3
      core/io/file_access_zip.h
  19. 0 2
      core/io/image.cpp
  20. 0 1
      core/io/image.h
  21. 0 2
      core/io/image_loader.cpp
  22. 0 1
      core/io/ip_address.cpp
  23. 0 3
      core/io/logger.cpp
  24. 0 2
      core/io/packet_peer_dtls.cpp
  25. 3 0
      core/io/plist.cpp
  26. 0 2
      core/io/plist.h
  27. 0 1
      core/io/remote_filesystem_client.h
  28. 0 4
      core/io/resource.cpp
  29. 0 2
      core/io/resource_format_binary.cpp
  30. 0 1
      core/io/resource_loader.h
  31. 1 1
      core/io/xml_parser.cpp
  32. 0 1
      core/io/xml_parser.h
  33. 0 1
      core/math/a_star.cpp
  34. 0 1
      core/math/a_star_grid_2d.h
  35. 0 3
      core/math/convex_hull.cpp
  36. 0 2
      core/math/geometry_3d.cpp
  37. 0 2
      core/math/quick_hull.cpp
  38. 0 2
      core/math/quick_hull.h
  39. 0 1
      core/math/transform_3d.cpp
  40. 0 2
      core/object/callable_method_pointer.h
  41. 0 1
      core/object/class_db.cpp
  42. 0 1
      core/object/object.cpp
  43. 0 2
      core/object/script_language.cpp
  44. 0 1
      core/object/script_language.h
  45. 0 2
      core/os/main_loop.cpp
  46. 0 2
      core/os/memory.cpp
  47. 0 1
      core/os/mutex.h
  48. 0 1
      core/os/os.cpp
  49. 0 1
      core/os/os.h
  50. 0 2
      core/os/thread.h
  51. 0 2
      core/os/thread_safe.h
  52. 0 2
      core/register_core_types.cpp
  53. 1 1
      core/string/node_path.cpp
  54. 0 2
      core/string/print_string.cpp
  55. 0 1
      core/string/ustring.cpp
  56. 0 2
      core/string/ustring.h
  57. 0 3
      core/templates/command_queue_mt.cpp
  58. 0 1
      core/templates/command_queue_mt.h
  59. 0 2
      core/templates/hash_map.h
  60. 0 2
      core/templates/rid_owner.h
  61. 0 1
      core/variant/array.cpp
  62. 0 1
      core/variant/array.h
  63. 0 1
      core/variant/callable.h
  64. 0 2
      core/variant/variant.cpp
  65. 0 2
      core/variant/variant_destruct.cpp
  66. 0 2
      core/variant/variant_parser.cpp
  67. 0 1
      core/variant/variant_setget.h
  68. 1 0
      main/main.cpp

+ 0 - 1
core/config/engine.h

@@ -34,7 +34,6 @@
 #include "core/os/main_loop.h"
 #include "core/os/main_loop.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "core/templates/list.h"
 #include "core/templates/list.h"
-#include "core/templates/vector.h"
 
 
 template <typename T>
 template <typename T>
 class TypedArray;
 class TypedArray;

+ 0 - 1
core/config/project_settings.cpp

@@ -39,7 +39,6 @@
 #include "core/io/marshalls.h"
 #include "core/io/marshalls.h"
 #include "core/io/resource_uid.h"
 #include "core/io/resource_uid.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
-#include "core/os/keyboard.h"
 #include "core/templates/rb_set.h"
 #include "core/templates/rb_set.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/variant_parser.h"
 #include "core/variant/variant_parser.h"

+ 0 - 2
core/core_bind.cpp

@@ -35,8 +35,6 @@
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/script_debugger.h"
 #include "core/debugger/script_debugger.h"
-#include "core/io/file_access_compressed.h"
-#include "core/io/file_access_encrypted.h"
 #include "core/io/marshalls.h"
 #include "core/io/marshalls.h"
 #include "core/math/geometry_2d.h"
 #include "core/math/geometry_2d.h"
 #include "core/math/geometry_3d.h"
 #include "core/math/geometry_3d.h"

+ 0 - 2
core/core_bind.h

@@ -34,8 +34,6 @@
 #include "core/debugger/engine_profiler.h"
 #include "core/debugger/engine_profiler.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_saver.h"
 #include "core/io/resource_saver.h"
-#include "core/object/script_language.h"
-#include "core/os/os.h"
 #include "core/os/semaphore.h"
 #include "core/os/semaphore.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"
 #include "core/templates/safe_refcount.h"
 #include "core/templates/safe_refcount.h"

+ 0 - 1
core/core_constants.cpp

@@ -33,7 +33,6 @@
 #include "core/input/input_event.h"
 #include "core/input/input_event.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
-#include "core/templates/hash_set.h"
 #include "core/variant/variant.h"
 #include "core/variant/variant.h"
 
 
 struct _CoreConstant {
 struct _CoreConstant {

+ 1 - 1
core/core_constants.h

@@ -32,7 +32,7 @@
 #define CORE_CONSTANTS_H
 #define CORE_CONSTANTS_H
 
 
 #include "core/string/string_name.h"
 #include "core/string/string_name.h"
-#include "core/templates/hash_set.h"
+#include "core/templates/hash_map.h"
 
 
 class CoreConstants {
 class CoreConstants {
 public:
 public:

+ 0 - 4
core/crypto/crypto.cpp

@@ -30,10 +30,6 @@
 
 
 #include "crypto.h"
 #include "crypto.h"
 
 
-#include "core/config/engine.h"
-#include "core/io/certs_compressed.gen.h"
-#include "core/io/compression.h"
-
 /// Resources
 /// Resources
 
 
 CryptoKey *(*CryptoKey::_create)(bool p_notify_postinitialize) = nullptr;
 CryptoKey *(*CryptoKey::_create)(bool p_notify_postinitialize) = nullptr;

+ 0 - 1
core/debugger/engine_debugger.h

@@ -36,7 +36,6 @@
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"
 #include "core/variant/array.h"
 #include "core/variant/array.h"
-#include "core/variant/variant.h"
 
 
 class RemoteDebuggerPeer;
 class RemoteDebuggerPeer;
 class ScriptDebugger;
 class ScriptDebugger;

+ 0 - 1
core/debugger/script_debugger.h

@@ -34,7 +34,6 @@
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/string/string_name.h"
 #include "core/string/string_name.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
-#include "core/templates/rb_map.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"
 
 
 class ScriptDebugger {
 class ScriptDebugger {

+ 0 - 1
core/input/shortcut.cpp

@@ -29,7 +29,6 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "shortcut.h"
 #include "shortcut.h"
-#include "core/os/keyboard.h"
 
 
 void Shortcut::set_events(const Array &p_events) {
 void Shortcut::set_events(const Array &p_events) {
 	for (int i = 0; i < p_events.size(); i++) {
 	for (int i = 0; i < p_events.size(); i++) {

+ 0 - 1
core/io/config_file.cpp

@@ -31,7 +31,6 @@
 #include "config_file.h"
 #include "config_file.h"
 
 
 #include "core/io/file_access_encrypted.h"
 #include "core/io/file_access_encrypted.h"
-#include "core/os/keyboard.h"
 #include "core/string/string_builder.h"
 #include "core/string/string_builder.h"
 #include "core/variant/variant_parser.h"
 #include "core/variant/variant_parser.h"
 
 

+ 0 - 3
core/io/dtls_server.cpp

@@ -30,9 +30,6 @@
 
 
 #include "dtls_server.h"
 #include "dtls_server.h"
 
 
-#include "core/config/project_settings.h"
-#include "core/io/file_access.h"
-
 DTLSServer *(*DTLSServer::_create)(bool p_notify_postinitialize) = nullptr;
 DTLSServer *(*DTLSServer::_create)(bool p_notify_postinitialize) = nullptr;
 bool DTLSServer::available = false;
 bool DTLSServer::available = false;
 
 

+ 0 - 2
core/io/file_access_compressed.cpp

@@ -30,8 +30,6 @@
 
 
 #include "file_access_compressed.h"
 #include "file_access_compressed.h"
 
 
-#include "core/string/print_string.h"
-
 void FileAccessCompressed::configure(const String &p_magic, Compression::Mode p_mode, uint32_t p_block_size) {
 void FileAccessCompressed::configure(const String &p_magic, Compression::Mode p_mode, uint32_t p_block_size) {
 	magic = p_magic.ascii().get_data();
 	magic = p_magic.ascii().get_data();
 	magic = (magic + "    ").substr(0, 4);
 	magic = (magic + "    ").substr(0, 4);

+ 0 - 3
core/io/file_access_encrypted.cpp

@@ -31,11 +31,8 @@
 #include "file_access_encrypted.h"
 #include "file_access_encrypted.h"
 
 
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
-#include "core/string/print_string.h"
 #include "core/variant/variant.h"
 #include "core/variant/variant.h"
 
 
-#include <stdio.h>
-
 Error FileAccessEncrypted::open_and_parse(Ref<FileAccess> p_base, const Vector<uint8_t> &p_key, Mode p_mode, bool p_with_magic, const Vector<uint8_t> &p_iv) {
 Error FileAccessEncrypted::open_and_parse(Ref<FileAccess> p_base, const Vector<uint8_t> &p_key, Mode p_mode, bool p_with_magic, const Vector<uint8_t> &p_iv) {
 	ERR_FAIL_COND_V_MSG(file.is_valid(), ERR_ALREADY_IN_USE, vformat("Can't open file while another file from path '%s' is open.", file->get_path_absolute()));
 	ERR_FAIL_COND_V_MSG(file.is_valid(), ERR_ALREADY_IN_USE, vformat("Can't open file while another file from path '%s' is open.", file->get_path_absolute()));
 	ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER);
 	ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER);

+ 0 - 2
core/io/file_access_memory.cpp

@@ -31,8 +31,6 @@
 #include "file_access_memory.h"
 #include "file_access_memory.h"
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
-#include "core/io/dir_access.h"
-#include "core/templates/rb_map.h"
 
 
 static HashMap<String, Vector<uint8_t>> *files = nullptr;
 static HashMap<String, Vector<uint8_t>> *files = nullptr;
 
 

+ 0 - 2
core/io/file_access_pack.cpp

@@ -35,8 +35,6 @@
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/version.h"
 #include "core/version.h"
 
 
-#include <stdio.h>
-
 Error PackedData::add_pack(const String &p_path, bool p_replace_files, uint64_t p_offset) {
 Error PackedData::add_pack(const String &p_path, bool p_replace_files, uint64_t p_offset) {
 	for (int i = 0; i < sources.size(); i++) {
 	for (int i = 0; i < sources.size(); i++) {
 		if (sources[i]->try_open_pack(p_path, p_replace_files, p_offset)) {
 		if (sources[i]->try_open_pack(p_path, p_replace_files, p_offset)) {

+ 0 - 1
core/io/file_access_pack.h

@@ -36,7 +36,6 @@
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/list.h"
 #include "core/templates/list.h"
-#include "core/templates/rb_map.h"
 
 
 // Godot's packed file magic header ("GDPC" in ASCII).
 // Godot's packed file magic header ("GDPC" in ASCII).
 #define PACK_HEADER_MAGIC 0x43504447
 #define PACK_HEADER_MAGIC 0x43504447

+ 0 - 3
core/io/file_access_zip.h

@@ -34,12 +34,9 @@
 #ifdef MINIZIP_ENABLED
 #ifdef MINIZIP_ENABLED
 
 
 #include "core/io/file_access_pack.h"
 #include "core/io/file_access_pack.h"
-#include "core/templates/rb_map.h"
 
 
 #include "thirdparty/minizip/unzip.h"
 #include "thirdparty/minizip/unzip.h"
 
 
-#include <stdlib.h>
-
 class ZipArchive : public PackSource {
 class ZipArchive : public PackSource {
 public:
 public:
 	struct File {
 	struct File {

+ 0 - 2
core/io/image.cpp

@@ -36,11 +36,9 @@
 #include "core/io/image_loader.h"
 #include "core/io/image_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/math/math_funcs.h"
 #include "core/math/math_funcs.h"
-#include "core/string/print_string.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
 #include "core/variant/dictionary.h"
 #include "core/variant/dictionary.h"
 
 
-#include <stdio.h>
 #include <cmath>
 #include <cmath>
 
 
 const char *Image::format_names[Image::FORMAT_MAX] = {
 const char *Image::format_names[Image::FORMAT_MAX] = {

+ 0 - 1
core/io/image.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/math/color.h"
 #include "core/math/color.h"
-#include "core/math/rect2.h"
 
 
 /**
 /**
  * Image storage class. This is used to store an image in user memory, as well as
  * Image storage class. This is used to store an image in user memory, as well as

+ 0 - 2
core/io/image_loader.cpp

@@ -30,8 +30,6 @@
 
 
 #include "image_loader.h"
 #include "image_loader.h"
 
 
-#include "core/string/print_string.h"
-
 void ImageFormatLoader::_bind_methods() {
 void ImageFormatLoader::_bind_methods() {
 	BIND_BITFIELD_FLAG(FLAG_NONE);
 	BIND_BITFIELD_FLAG(FLAG_NONE);
 	BIND_BITFIELD_FLAG(FLAG_FORCE_LINEAR);
 	BIND_BITFIELD_FLAG(FLAG_FORCE_LINEAR);

+ 0 - 1
core/io/ip_address.cpp

@@ -34,7 +34,6 @@ IPAddress::operator Variant() const {
 	return operator String();
 	return operator String();
 }*/
 }*/
 
 
-#include <stdio.h>
 #include <string.h>
 #include <string.h>
 
 
 IPAddress::operator String() const {
 IPAddress::operator String() const {

+ 0 - 3
core/io/logger.cpp

@@ -30,12 +30,9 @@
 
 
 #include "logger.h"
 #include "logger.h"
 
 
-#include "core/config/project_settings.h"
 #include "core/core_globals.h"
 #include "core/core_globals.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
-#include "core/os/os.h"
 #include "core/os/time.h"
 #include "core/os/time.h"
-#include "core/string/print_string.h"
 
 
 #include "modules/modules_enabled.gen.h" // For regex.
 #include "modules/modules_enabled.gen.h" // For regex.
 
 

+ 0 - 2
core/io/packet_peer_dtls.cpp

@@ -29,8 +29,6 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "packet_peer_dtls.h"
 #include "packet_peer_dtls.h"
-#include "core/config/project_settings.h"
-#include "core/io/file_access.h"
 
 
 PacketPeerDTLS *(*PacketPeerDTLS::_create)(bool p_notify_postinitialize) = nullptr;
 PacketPeerDTLS *(*PacketPeerDTLS::_create)(bool p_notify_postinitialize) = nullptr;
 bool PacketPeerDTLS::available = false;
 bool PacketPeerDTLS::available = false;

+ 3 - 0
core/io/plist.cpp

@@ -30,6 +30,9 @@
 
 
 #include "plist.h"
 #include "plist.h"
 
 
+#include "core/crypto/crypto_core.h"
+#include "core/os/time.h"
+
 PList::PLNodeType PListNode::get_type() const {
 PList::PLNodeType PListNode::get_type() const {
 	return data_type;
 	return data_type;
 }
 }

+ 0 - 2
core/io/plist.h

@@ -33,9 +33,7 @@
 
 
 // Property list file format (application/x-plist) parser, property list ASN-1 serialization.
 // Property list file format (application/x-plist) parser, property list ASN-1 serialization.
 
 
-#include "core/crypto/crypto_core.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
-#include "core/os/time.h"
 
 
 class PListNode;
 class PListNode;
 
 

+ 0 - 1
core/io/remote_filesystem_client.h

@@ -31,7 +31,6 @@
 #ifndef REMOTE_FILESYSTEM_CLIENT_H
 #ifndef REMOTE_FILESYSTEM_CLIENT_H
 #define REMOTE_FILESYSTEM_CLIENT_H
 #define REMOTE_FILESYSTEM_CLIENT_H
 
 
-#include "core/io/ip_address.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"

+ 0 - 4
core/io/resource.cpp

@@ -30,15 +30,11 @@
 
 
 #include "resource.h"
 #include "resource.h"
 
 
-#include "core/io/file_access.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/math/math_funcs.h"
 #include "core/math/math_funcs.h"
-#include "core/object/script_language.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "scene/main/node.h" //only so casting works
 #include "scene/main/node.h" //only so casting works
 
 
-#include <stdio.h>
-
 void Resource::emit_changed() {
 void Resource::emit_changed() {
 	if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
 	if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
 		ResourceLoader::resource_changed_emit(this);
 		ResourceLoader::resource_changed_emit(this);

+ 0 - 2
core/io/resource_format_binary.cpp

@@ -33,8 +33,6 @@
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access_compressed.h"
 #include "core/io/file_access_compressed.h"
-#include "core/io/image.h"
-#include "core/io/marshalls.h"
 #include "core/io/missing_resource.h"
 #include "core/io/missing_resource.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/version.h"
 #include "core/version.h"

+ 0 - 1
core/io/resource_loader.h

@@ -34,7 +34,6 @@
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/worker_thread_pool.h"
 #include "core/object/worker_thread_pool.h"
-#include "core/os/semaphore.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"
 
 
 class ConditionVariable;
 class ConditionVariable;

+ 1 - 1
core/io/xml_parser.cpp

@@ -30,7 +30,7 @@
 
 
 #include "xml_parser.h"
 #include "xml_parser.h"
 
 
-#include "core/string/print_string.h"
+#include "core/io/file_access.h"
 
 
 //#define DEBUG_XML
 //#define DEBUG_XML
 
 

+ 0 - 1
core/io/xml_parser.h

@@ -31,7 +31,6 @@
 #ifndef XML_PARSER_H
 #ifndef XML_PARSER_H
 #define XML_PARSER_H
 #define XML_PARSER_H
 
 
-#include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"

+ 0 - 1
core/math/a_star.cpp

@@ -32,7 +32,6 @@
 #include "a_star.compat.inc"
 #include "a_star.compat.inc"
 
 
 #include "core/math/geometry_3d.h"
 #include "core/math/geometry_3d.h"
-#include "core/object/script_language.h"
 
 
 int64_t AStar3D::get_available_point_id() const {
 int64_t AStar3D::get_available_point_id() const {
 	if (points.has(last_free_id)) {
 	if (points.has(last_free_id)) {

+ 0 - 1
core/math/a_star_grid_2d.h

@@ -33,7 +33,6 @@
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/templates/list.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
 
 
 class AStarGrid2D : public RefCounted {
 class AStarGrid2D : public RefCounted {

+ 0 - 3
core/math/convex_hull.cpp

@@ -61,12 +61,9 @@ subject to the following restrictions:
 #include "core/error/error_macros.h"
 #include "core/error/error_macros.h"
 #include "core/math/aabb.h"
 #include "core/math/aabb.h"
 #include "core/math/math_defs.h"
 #include "core/math/math_defs.h"
-#include "core/os/memory.h"
 #include "core/templates/oa_hash_map.h"
 #include "core/templates/oa_hash_map.h"
 #include "core/templates/paged_allocator.h"
 #include "core/templates/paged_allocator.h"
 
 
-#include <string.h>
-
 //#define DEBUG_CONVEX_HULL
 //#define DEBUG_CONVEX_HULL
 //#define SHOW_ITERATIONS
 //#define SHOW_ITERATIONS
 
 

+ 0 - 2
core/math/geometry_3d.cpp

@@ -30,8 +30,6 @@
 
 
 #include "geometry_3d.h"
 #include "geometry_3d.h"
 
 
-#include "thirdparty/misc/polypartition.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) {
 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.
 	// Based on David Eberly's Computation of Distance Between Line Segments algorithm.
 
 

+ 0 - 2
core/math/quick_hull.cpp

@@ -30,8 +30,6 @@
 
 
 #include "quick_hull.h"
 #include "quick_hull.h"
 
 
-#include "core/templates/rb_map.h"
-
 uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF;
 uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF;
 
 
 Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_mesh) {
 Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_mesh) {

+ 0 - 2
core/math/quick_hull.h

@@ -31,9 +31,7 @@
 #ifndef QUICK_HULL_H
 #ifndef QUICK_HULL_H
 #define QUICK_HULL_H
 #define QUICK_HULL_H
 
 
-#include "core/math/aabb.h"
 #include "core/math/geometry_3d.h"
 #include "core/math/geometry_3d.h"
-#include "core/templates/hash_set.h"
 #include "core/templates/list.h"
 #include "core/templates/list.h"
 
 
 class QuickHull {
 class QuickHull {

+ 0 - 1
core/math/transform_3d.cpp

@@ -30,7 +30,6 @@
 
 
 #include "transform_3d.h"
 #include "transform_3d.h"
 
 
-#include "core/math/math_funcs.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 
 
 void Transform3D::affine_invert() {
 void Transform3D::affine_invert() {

+ 0 - 2
core/object/callable_method_pointer.h

@@ -32,8 +32,6 @@
 #define CALLABLE_METHOD_POINTER_H
 #define CALLABLE_METHOD_POINTER_H
 
 
 #include "core/object/object.h"
 #include "core/object/object.h"
-#include "core/templates/hashfuncs.h"
-#include "core/templates/simple_type.h"
 #include "core/variant/binder_common.h"
 #include "core/variant/binder_common.h"
 #include "core/variant/callable.h"
 #include "core/variant/callable.h"
 
 

+ 0 - 1
core/object/class_db.cpp

@@ -33,7 +33,6 @@
 #include "core/config/engine.h"
 #include "core/config/engine.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
-#include "core/os/mutex.h"
 #include "core/version.h"
 #include "core/version.h"
 
 
 #define OBJTYPE_RLOCK RWLockRead _rw_lockr_(lock);
 #define OBJTYPE_RLOCK RWLockRead _rw_lockr_(lock);

+ 0 - 1
core/object/object.cpp

@@ -38,7 +38,6 @@
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "core/string/translation_server.h"
 #include "core/string/translation_server.h"
-#include "core/templates/local_vector.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
 
 
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED

+ 0 - 2
core/object/script_language.cpp

@@ -35,8 +35,6 @@
 #include "core/debugger/script_debugger.h"
 #include "core/debugger/script_debugger.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 
 
-#include <stdint.h>
-
 ScriptLanguage *ScriptServer::_languages[MAX_LANGUAGES];
 ScriptLanguage *ScriptServer::_languages[MAX_LANGUAGES];
 int ScriptServer::_language_count = 0;
 int ScriptServer::_language_count = 0;
 bool ScriptServer::languages_ready = false;
 bool ScriptServer::languages_ready = false;

+ 0 - 1
core/object/script_language.h

@@ -35,7 +35,6 @@
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/script_instance.h"
 #include "core/object/script_instance.h"
 #include "core/templates/pair.h"
 #include "core/templates/pair.h"
-#include "core/templates/rb_map.h"
 #include "core/templates/safe_refcount.h"
 #include "core/templates/safe_refcount.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
 
 

+ 0 - 2
core/os/main_loop.cpp

@@ -30,8 +30,6 @@
 
 
 #include "main_loop.h"
 #include "main_loop.h"
 
 
-#include "core/object/script_language.h"
-
 void MainLoop::_bind_methods() {
 void MainLoop::_bind_methods() {
 	BIND_CONSTANT(NOTIFICATION_OS_MEMORY_WARNING);
 	BIND_CONSTANT(NOTIFICATION_OS_MEMORY_WARNING);
 	BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);
 	BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);

+ 0 - 2
core/os/memory.cpp

@@ -30,10 +30,8 @@
 
 
 #include "memory.h"
 #include "memory.h"
 
 
-#include "core/error/error_macros.h"
 #include "core/templates/safe_refcount.h"
 #include "core/templates/safe_refcount.h"
 
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 
 

+ 0 - 1
core/os/mutex.h

@@ -31,7 +31,6 @@
 #ifndef MUTEX_H
 #ifndef MUTEX_H
 #define MUTEX_H
 #define MUTEX_H
 
 
-#include "core/error/error_macros.h"
 #include "core/typedefs.h"
 #include "core/typedefs.h"
 
 
 #ifdef MINGW_ENABLED
 #ifdef MINGW_ENABLED

+ 0 - 1
core/os/os.cpp

@@ -31,7 +31,6 @@
 #include "os.h"
 #include "os.h"
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
-#include "core/input/input.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/io/json.h"
 #include "core/io/json.h"

+ 0 - 1
core/os/os.h

@@ -39,7 +39,6 @@
 #include "core/templates/list.h"
 #include "core/templates/list.h"
 #include "core/templates/vector.h"
 #include "core/templates/vector.h"
 
 
-#include <stdarg.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
 class OS {
 class OS {

+ 0 - 2
core/os/thread.h

@@ -42,8 +42,6 @@
 #include "core/templates/safe_refcount.h"
 #include "core/templates/safe_refcount.h"
 #include "core/typedefs.h"
 #include "core/typedefs.h"
 
 
-#include <new>
-
 #ifdef MINGW_ENABLED
 #ifdef MINGW_ENABLED
 #define MINGW_STDTHREAD_REDUNDANCY_WARNING
 #define MINGW_STDTHREAD_REDUNDANCY_WARNING
 #include "thirdparty/mingw-std-threads/mingw.thread.h"
 #include "thirdparty/mingw-std-threads/mingw.thread.h"

+ 0 - 2
core/os/thread_safe.h

@@ -31,8 +31,6 @@
 #ifndef THREAD_SAFE_H
 #ifndef THREAD_SAFE_H
 #define THREAD_SAFE_H
 #define THREAD_SAFE_H
 
 
-#include "core/os/mutex.h"
-
 #define _THREAD_SAFE_CLASS_ mutable Mutex _thread_safe_;
 #define _THREAD_SAFE_CLASS_ mutable Mutex _thread_safe_;
 #define _THREAD_SAFE_METHOD_ MutexLock _thread_safe_method_(_thread_safe_);
 #define _THREAD_SAFE_METHOD_ MutexLock _thread_safe_method_(_thread_safe_);
 #define _THREAD_SAFE_LOCK_ _thread_safe_.lock();
 #define _THREAD_SAFE_LOCK_ _thread_safe_.lock();

+ 0 - 2
core/register_core_types.cpp

@@ -67,8 +67,6 @@
 #include "core/math/a_star.h"
 #include "core/math/a_star.h"
 #include "core/math/a_star_grid_2d.h"
 #include "core/math/a_star_grid_2d.h"
 #include "core/math/expression.h"
 #include "core/math/expression.h"
-#include "core/math/geometry_2d.h"
-#include "core/math/geometry_3d.h"
 #include "core/math/random_number_generator.h"
 #include "core/math/random_number_generator.h"
 #include "core/math/triangle_mesh.h"
 #include "core/math/triangle_mesh.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"

+ 1 - 1
core/string/node_path.cpp

@@ -30,7 +30,7 @@
 
 
 #include "node_path.h"
 #include "node_path.h"
 
 
-#include "core/string/print_string.h"
+#include "core/variant/variant.h"
 
 
 void NodePath::_update_hash_cache() const {
 void NodePath::_update_hash_cache() const {
 	uint32_t h = data->absolute ? 1 : 0;
 	uint32_t h = data->absolute ? 1 : 0;

+ 0 - 2
core/string/print_string.cpp

@@ -33,8 +33,6 @@
 #include "core/core_globals.h"
 #include "core/core_globals.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 
 
-#include <stdio.h>
-
 static PrintHandlerList *print_handler_list = nullptr;
 static PrintHandlerList *print_handler_list = nullptr;
 
 
 void add_print_handler(PrintHandlerList *p_handler) {
 void add_print_handler(PrintHandlerList *p_handler) {

+ 0 - 1
core/string/ustring.cpp

@@ -34,7 +34,6 @@
 #include "core/math/color.h"
 #include "core/math/color.h"
 #include "core/math/math_funcs.h"
 #include "core/math/math_funcs.h"
 #include "core/object/object.h"
 #include "core/object/object.h"
-#include "core/os/memory.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "core/string/string_name.h"
 #include "core/string/string_name.h"
 #include "core/string/translation_server.h"
 #include "core/string/translation_server.h"

+ 0 - 2
core/string/ustring.h

@@ -39,8 +39,6 @@
 #include "core/typedefs.h"
 #include "core/typedefs.h"
 #include "core/variant/array.h"
 #include "core/variant/array.h"
 
 
-#include <utility>
-
 /*************************************************************************/
 /*************************************************************************/
 /*  Utility Functions                                                    */
 /*  Utility Functions                                                    */
 /*************************************************************************/
 /*************************************************************************/

+ 0 - 3
core/templates/command_queue_mt.cpp

@@ -30,9 +30,6 @@
 
 
 #include "command_queue_mt.h"
 #include "command_queue_mt.h"
 
 
-#include "core/config/project_settings.h"
-#include "core/os/os.h"
-
 CommandQueueMT::CommandQueueMT() {
 CommandQueueMT::CommandQueueMT() {
 	command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024);
 	command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024);
 }
 }

+ 0 - 1
core/templates/command_queue_mt.h

@@ -35,7 +35,6 @@
 #include "core/os/condition_variable.h"
 #include "core/os/condition_variable.h"
 #include "core/os/memory.h"
 #include "core/os/memory.h"
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
-#include "core/string/print_string.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/simple_type.h"
 #include "core/templates/simple_type.h"
 #include "core/typedefs.h"
 #include "core/typedefs.h"

+ 0 - 2
core/templates/hash_map.h

@@ -31,10 +31,8 @@
 #ifndef HASH_MAP_H
 #ifndef HASH_MAP_H
 #define HASH_MAP_H
 #define HASH_MAP_H
 
 
-#include "core/math/math_funcs.h"
 #include "core/os/memory.h"
 #include "core/os/memory.h"
 #include "core/templates/hashfuncs.h"
 #include "core/templates/hashfuncs.h"
-#include "core/templates/paged_allocator.h"
 #include "core/templates/pair.h"
 #include "core/templates/pair.h"
 
 
 /**
 /**

+ 0 - 2
core/templates/rid_owner.h

@@ -34,9 +34,7 @@
 #include "core/os/memory.h"
 #include "core/os/memory.h"
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
-#include "core/templates/hash_set.h"
 #include "core/templates/list.h"
 #include "core/templates/list.h"
-#include "core/templates/oa_hash_map.h"
 #include "core/templates/rid.h"
 #include "core/templates/rid.h"
 #include "core/templates/safe_refcount.h"
 #include "core/templates/safe_refcount.h"
 
 

+ 0 - 1
core/variant/array.cpp

@@ -32,7 +32,6 @@
 
 
 #include "container_type_validate.h"
 #include "container_type_validate.h"
 #include "core/math/math_funcs.h"
 #include "core/math/math_funcs.h"
-#include "core/object/class_db.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
 #include "core/templates/hashfuncs.h"
 #include "core/templates/hashfuncs.h"
 #include "core/templates/search_array.h"
 #include "core/templates/search_array.h"

+ 0 - 1
core/variant/array.h

@@ -36,7 +36,6 @@
 #include <climits>
 #include <climits>
 
 
 class Callable;
 class Callable;
-class Object;
 class StringName;
 class StringName;
 class Variant;
 class Variant;
 
 

+ 0 - 1
core/variant/callable.h

@@ -33,7 +33,6 @@
 
 
 #include "core/object/object_id.h"
 #include "core/object/object_id.h"
 #include "core/string/string_name.h"
 #include "core/string/string_name.h"
-#include "core/templates/list.h"
 
 
 class Object;
 class Object;
 class Variant;
 class Variant;

+ 0 - 2
core/variant/variant.cpp

@@ -32,10 +32,8 @@
 
 
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/io/json.h"
 #include "core/io/json.h"
-#include "core/io/marshalls.h"
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/math/math_funcs.h"
 #include "core/math/math_funcs.h"
-#include "core/string/print_string.h"
 #include "core/variant/variant_parser.h"
 #include "core/variant/variant_parser.h"
 
 
 PagedAllocator<Variant::Pools::BucketSmall, true> Variant::Pools::_bucket_small;
 PagedAllocator<Variant::Pools::BucketSmall, true> Variant::Pools::_bucket_small;

+ 0 - 2
core/variant/variant_destruct.cpp

@@ -30,8 +30,6 @@
 
 
 #include "variant_destruct.h"
 #include "variant_destruct.h"
 
 
-#include "core/templates/local_vector.h"
-
 static Variant::PTRDestructor destruct_pointers[Variant::VARIANT_MAX] = { nullptr };
 static Variant::PTRDestructor destruct_pointers[Variant::VARIANT_MAX] = { nullptr };
 
 
 template <typename T>
 template <typename T>

+ 0 - 2
core/variant/variant_parser.cpp

@@ -31,10 +31,8 @@
 #include "variant_parser.h"
 #include "variant_parser.h"
 
 
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
-#include "core/input/input_event.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/object/script_language.h"
 #include "core/object/script_language.h"
-#include "core/os/keyboard.h"
 #include "core/string/string_buffer.h"
 #include "core/string/string_buffer.h"
 
 
 char32_t VariantParser::Stream::get_char() {
 char32_t VariantParser::Stream::get_char() {

+ 0 - 1
core/variant/variant_setget.h

@@ -35,7 +35,6 @@
 
 
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
-#include "core/templates/local_vector.h"
 #include "core/variant/variant_internal.h"
 #include "core/variant/variant_internal.h"
 
 
 /**** NAMED SETTERS AND GETTERS ****/
 /**** NAMED SETTERS AND GETTERS ****/

+ 1 - 0
main/main.cpp

@@ -47,6 +47,7 @@
 #include "core/io/ip.h"
 #include "core/io/ip.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/object/message_queue.h"
 #include "core/object/message_queue.h"
+#include "core/object/script_language.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/os/time.h"
 #include "core/os/time.h"
 #include "core/register_core_types.h"
 #include "core/register_core_types.h"