Bladeren bron

Merge pull request #102298 from Repiteo/style/pragma-once

Replace header guards style with `#pragma once`
Thaddeus Crews 5 maanden geleden
bovenliggende
commit
b5bdb88062
100 gewijzigde bestanden met toevoegingen van 102 en 391 verwijderingen
  1. 3 0
      .git-blame-ignore-revs
  2. 0 1
      .pre-commit-config.yaml
  3. 1 4
      core/config/engine.h
  4. 1 4
      core/config/project_settings.h
  5. 1 4
      core/core_bind.h
  6. 1 4
      core/core_constants.h
  7. 1 4
      core/core_globals.h
  8. 1 4
      core/core_string_names.h
  9. 1 4
      core/crypto/aes_context.h
  10. 1 4
      core/crypto/crypto.h
  11. 1 4
      core/crypto/crypto_core.h
  12. 1 4
      core/crypto/hashing_context.h
  13. 1 4
      core/debugger/debugger_marshalls.h
  14. 1 4
      core/debugger/engine_debugger.h
  15. 1 4
      core/debugger/engine_profiler.h
  16. 1 4
      core/debugger/local_debugger.h
  17. 1 4
      core/debugger/remote_debugger.h
  18. 1 4
      core/debugger/remote_debugger_peer.h
  19. 1 4
      core/debugger/script_debugger.h
  20. 1 4
      core/doc_data.h
  21. 1 4
      core/error/error_list.h
  22. 1 4
      core/error/error_macros.h
  23. 1 4
      core/extension/extension_api_dump.h
  24. 1 4
      core/extension/gdextension.h
  25. 1 4
      core/extension/gdextension_interface.h
  26. 1 4
      core/extension/gdextension_library_loader.h
  27. 1 4
      core/extension/gdextension_loader.h
  28. 1 4
      core/extension/gdextension_manager.h
  29. 1 4
      core/extension/gdextension_special_compat_hashes.h
  30. 1 4
      core/extension/make_interface_dumper.py
  31. 1 6
      core/extension/make_wrappers.py
  32. 1 4
      core/input/default_controller_mappings.h
  33. 1 4
      core/input/input.h
  34. 1 4
      core/input/input_enums.h
  35. 1 4
      core/input/input_event.h
  36. 1 4
      core/input/input_map.h
  37. 1 4
      core/input/shortcut.h
  38. 1 4
      core/io/compression.h
  39. 1 4
      core/io/config_file.h
  40. 1 4
      core/io/dir_access.h
  41. 1 4
      core/io/dtls_server.h
  42. 1 4
      core/io/file_access.h
  43. 1 4
      core/io/file_access_compressed.h
  44. 1 4
      core/io/file_access_encrypted.h
  45. 1 4
      core/io/file_access_memory.h
  46. 1 4
      core/io/file_access_pack.h
  47. 1 4
      core/io/file_access_zip.h
  48. 1 4
      core/io/http_client.h
  49. 1 4
      core/io/http_client_tcp.h
  50. 1 4
      core/io/image.h
  51. 1 4
      core/io/image_loader.h
  52. 1 4
      core/io/ip.h
  53. 1 4
      core/io/ip_address.h
  54. 1 4
      core/io/json.h
  55. 1 4
      core/io/logger.h
  56. 1 4
      core/io/marshalls.h
  57. 1 4
      core/io/missing_resource.h
  58. 1 4
      core/io/net_socket.h
  59. 1 4
      core/io/packed_data_container.h
  60. 1 4
      core/io/packet_peer.h
  61. 1 4
      core/io/packet_peer_dtls.h
  62. 1 4
      core/io/packet_peer_udp.h
  63. 1 4
      core/io/pck_packer.h
  64. 1 4
      core/io/plist.h
  65. 1 4
      core/io/remote_filesystem_client.h
  66. 1 4
      core/io/resource.h
  67. 1 4
      core/io/resource_format_binary.h
  68. 1 4
      core/io/resource_importer.h
  69. 1 4
      core/io/resource_loader.h
  70. 1 4
      core/io/resource_saver.h
  71. 1 4
      core/io/resource_uid.h
  72. 1 4
      core/io/stream_peer.h
  73. 1 4
      core/io/stream_peer_gzip.h
  74. 1 4
      core/io/stream_peer_tcp.h
  75. 1 4
      core/io/stream_peer_tls.h
  76. 1 4
      core/io/tcp_server.h
  77. 1 4
      core/io/translation_loader_po.h
  78. 1 4
      core/io/udp_server.h
  79. 1 4
      core/io/xml_parser.h
  80. 1 4
      core/io/zip_io.h
  81. 1 4
      core/math/a_star.h
  82. 1 4
      core/math/a_star_grid_2d.h
  83. 1 4
      core/math/aabb.h
  84. 1 4
      core/math/audio_frame.h
  85. 1 4
      core/math/basis.h
  86. 1 4
      core/math/bvh.h
  87. 1 4
      core/math/bvh_abb.h
  88. 1 4
      core/math/bvh_tree.h
  89. 1 4
      core/math/color.h
  90. 2 0
      core/math/color_names.inc
  91. 1 4
      core/math/convex_hull.h
  92. 1 4
      core/math/delaunay_2d.h
  93. 1 4
      core/math/delaunay_3d.h
  94. 1 4
      core/math/disjoint_set.h
  95. 1 4
      core/math/dynamic_bvh.h
  96. 1 4
      core/math/expression.h
  97. 1 4
      core/math/face3.h
  98. 1 4
      core/math/geometry_2d.h
  99. 1 4
      core/math/geometry_3d.h
  100. 1 4
      core/math/math_defs.h

+ 3 - 0
.git-blame-ignore-revs

@@ -69,3 +69,6 @@ e06d83860d798b6766b23d6eae48557387a7db85
 
 # Style: Enforce trailing newlines on svgs
 7e5baa042639ffa835271703c720e2595e90afb8
+
+# Style: Replace header guards with `#pragma once`
+324512e11c1b7663c3cf47bec6ddbe65c6b8db2b

+ 0 - 1
.pre-commit-config.yaml

@@ -154,7 +154,6 @@ repos:
         language: python
         entry: python misc/scripts/header_guards.py
         files: \.(h|hpp|hh|hxx)$
-        exclude: ^.*/(dummy|thread|platform_config|platform_gl)\.h$
 
       - id: file-format
         name: file-format

+ 1 - 4
core/config/engine.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef ENGINE_H
-#define ENGINE_H
+#pragma once
 
 #include "core/os/main_loop.h"
 #include "core/string/ustring.h"
@@ -214,5 +213,3 @@ public:
 	Engine();
 	virtual ~Engine();
 };
-
-#endif // ENGINE_H

+ 1 - 4
core/config/project_settings.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PROJECT_SETTINGS_H
-#define PROJECT_SETTINGS_H
+#pragma once
 
 #include "core/object/class_db.h"
 
@@ -243,5 +242,3 @@ Variant _GLOBAL_DEF(const PropertyInfo &p_info, const Variant &p_default, bool p
 #define GLOBAL_DEF_RST_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true, true)
 
 #define GLOBAL_DEF_INTERNAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, false, false, true)
-
-#endif // PROJECT_SETTINGS_H

+ 1 - 4
core/core_bind.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CORE_BIND_H
-#define CORE_BIND_H
+#pragma once
 
 #include "core/debugger/engine_profiler.h"
 #include "core/io/resource_loader.h"
@@ -670,5 +669,3 @@ VARIANT_ENUM_CAST(core_bind::Geometry2D::PolyEndType);
 VARIANT_ENUM_CAST(core_bind::Thread::Priority);
 
 VARIANT_ENUM_CAST(core_bind::special::ClassDB::APIType);
-
-#endif // CORE_BIND_H

+ 1 - 4
core/core_constants.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CORE_CONSTANTS_H
-#define CORE_CONSTANTS_H
+#pragma once
 
 #include "core/string/string_name.h"
 #include "core/templates/hash_map.h"
@@ -47,5 +46,3 @@ public:
 	static bool is_global_enum(const StringName &p_enum);
 	static void get_enum_values(const StringName &p_enum, HashMap<StringName, int64_t> *p_values);
 };
-
-#endif // CORE_CONSTANTS_H

+ 1 - 4
core/core_globals.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CORE_GLOBALS_H
-#define CORE_GLOBALS_H
+#pragma once
 
 // Home for state needed from global functions
 // that cannot be stored in Engine or OS due to e.g. circular includes
@@ -40,5 +39,3 @@ public:
 	static bool print_line_enabled;
 	static bool print_error_enabled;
 };
-
-#endif // CORE_GLOBALS_H

+ 1 - 4
core/core_string_names.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CORE_STRING_NAMES_H
-#define CORE_STRING_NAMES_H
+#pragma once
 
 #include "core/string/string_name.h"
 
@@ -87,5 +86,3 @@ public:
 };
 
 #define CoreStringName(m_name) CoreStringNames::get_singleton()->m_name
-
-#endif // CORE_STRING_NAMES_H

+ 1 - 4
core/crypto/aes_context.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef AES_CONTEXT_H
-#define AES_CONTEXT_H
+#pragma once
 
 #include "core/crypto/crypto_core.h"
 #include "core/object/ref_counted.h"
@@ -64,5 +63,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(AESContext::Mode);
-
-#endif // AES_CONTEXT_H

+ 1 - 4
core/crypto/crypto.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CRYPTO_H
-#define CRYPTO_H
+#pragma once
 
 #include "core/crypto/hashing_context.h"
 #include "core/io/resource.h"
@@ -167,5 +166,3 @@ public:
 	virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
 	virtual bool recognize(const Ref<Resource> &p_resource) const override;
 };
-
-#endif // CRYPTO_H

+ 1 - 4
core/crypto/crypto_core.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CRYPTO_CORE_H
-#define CRYPTO_CORE_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 
@@ -115,5 +114,3 @@ public:
 	static Error sha1(const uint8_t *p_src, int p_src_len, unsigned char r_hash[20]);
 	static Error sha256(const uint8_t *p_src, int p_src_len, unsigned char r_hash[32]);
 };
-
-#endif // CRYPTO_CORE_H

+ 1 - 4
core/crypto/hashing_context.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef HASHING_CONTEXT_H
-#define HASHING_CONTEXT_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 
@@ -62,5 +61,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(HashingContext::HashType);
-
-#endif // HASHING_CONTEXT_H

+ 1 - 4
core/debugger/debugger_marshalls.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DEBUGGER_MARSHALLS_H
-#define DEBUGGER_MARSHALLS_H
+#pragma once
 
 #include "core/input/shortcut.h"
 #include "core/object/script_language.h"
@@ -73,5 +72,3 @@ struct DebuggerMarshalls {
 	static Array serialize_key_shortcut(const Ref<Shortcut> &p_shortcut);
 	static Ref<Shortcut> deserialize_key_shortcut(const Array &p_keys);
 };
-
-#endif // DEBUGGER_MARSHALLS_H

+ 1 - 4
core/debugger/engine_debugger.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef ENGINE_DEBUGGER_H
-#define ENGINE_DEBUGGER_H
+#pragma once
 
 #include "core/string/string_name.h"
 #include "core/string/ustring.h"
@@ -140,5 +139,3 @@ public:
 
 	virtual ~EngineDebugger();
 };
-
-#endif // ENGINE_DEBUGGER_H

+ 1 - 4
core/debugger/engine_profiler.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef ENGINE_PROFILER_H
-#define ENGINE_PROFILER_H
+#pragma once
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
@@ -59,5 +58,3 @@ public:
 	EngineProfiler() {}
 	virtual ~EngineProfiler();
 };
-
-#endif // ENGINE_PROFILER_H

+ 1 - 4
core/debugger/local_debugger.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef LOCAL_DEBUGGER_H
-#define LOCAL_DEBUGGER_H
+#pragma once
 
 #include "core/debugger/engine_debugger.h"
 #include "core/object/script_language.h"
@@ -55,5 +54,3 @@ public:
 	LocalDebugger();
 	~LocalDebugger();
 };
-
-#endif // LOCAL_DEBUGGER_H

+ 1 - 4
core/debugger/remote_debugger.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef REMOTE_DEBUGGER_H
-#define REMOTE_DEBUGGER_H
+#pragma once
 
 #include "core/debugger/debugger_marshalls.h"
 #include "core/debugger/engine_debugger.h"
@@ -122,5 +121,3 @@ public:
 	explicit RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer);
 	~RemoteDebugger();
 };
-
-#endif // REMOTE_DEBUGGER_H

+ 1 - 4
core/debugger/remote_debugger_peer.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef REMOTE_DEBUGGER_PEER_H
-#define REMOTE_DEBUGGER_PEER_H
+#pragma once
 
 #include "core/io/stream_peer_tcp.h"
 #include "core/object/ref_counted.h"
@@ -92,5 +91,3 @@ public:
 	RemoteDebuggerPeerTCP(Ref<StreamPeerTCP> p_stream = Ref<StreamPeerTCP>());
 	~RemoteDebuggerPeerTCP();
 };
-
-#endif // REMOTE_DEBUGGER_PEER_H

+ 1 - 4
core/debugger/script_debugger.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef SCRIPT_DEBUGGER_H
-#define SCRIPT_DEBUGGER_H
+#pragma once
 
 #include "core/object/script_language.h"
 #include "core/string/string_name.h"
@@ -82,5 +81,3 @@ public:
 	Vector<StackInfo> get_error_stack_info() const;
 	ScriptDebugger() {}
 };
-
-#endif // SCRIPT_DEBUGGER_H

+ 1 - 4
core/doc_data.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DOC_DATA_H
-#define DOC_DATA_H
+#pragma once
 
 #include "core/io/xml_parser.h"
 #include "core/variant/variant.h"
@@ -980,5 +979,3 @@ public:
 	static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const PropertyInfo &p_arginfo);
 	static void method_doc_from_methodinfo(DocData::MethodDoc &p_method, const MethodInfo &p_methodinfo, const String &p_desc);
 };
-
-#endif // DOC_DATA_H

+ 1 - 4
core/error/error_list.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef ERROR_LIST_H
-#define ERROR_LIST_H
+#pragma once
 
 /** Error List. Please never compare an error against FAILED
  * Either do result != OK , or !result. This way, Error fail
@@ -98,5 +97,3 @@ enum Error {
 };
 
 extern const char *error_names[];
-
-#endif // ERROR_LIST_H

+ 1 - 4
core/error/error_macros.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef ERROR_MACROS_H
-#define ERROR_MACROS_H
+#pragma once
 
 #include "core/object/object_id.h"
 #include "core/typedefs.h"
@@ -845,5 +844,3 @@ void _physics_interpolation_warning(const char *p_function, const char *p_file,
 
 #define PHYSICS_INTERPOLATION_WARNING(m_string) \
 	_physics_interpolation_warning(FUNCTION_STR, __FILE__, __LINE__, ObjectID(UINT64_MAX), m_string)
-
-#endif // ERROR_MACROS_H

+ 1 - 4
core/extension/extension_api_dump.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef EXTENSION_API_DUMP_H
-#define EXTENSION_API_DUMP_H
+#pragma once
 
 #include "core/extension/gdextension.h"
 
@@ -42,5 +41,3 @@ public:
 	static Error validate_extension_json_file(const String &p_path);
 };
 #endif
-
-#endif // EXTENSION_API_DUMP_H

+ 1 - 4
core/extension/gdextension.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GDEXTENSION_H
-#define GDEXTENSION_H
+#pragma once
 
 #include "core/extension/gdextension_interface.h"
 #include "core/extension/gdextension_loader.h"
@@ -226,5 +225,3 @@ public:
 };
 
 #endif // TOOLS_ENABLED
-
-#endif // GDEXTENSION_H

+ 1 - 4
core/extension/gdextension_interface.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GDEXTENSION_INTERFACE_H
-#define GDEXTENSION_INTERFACE_H
+#pragma once
 
 /* This is a C class header, you can copy it and use it directly in your own binders.
  * Together with the JSON file, you should be able to generate any binder.
@@ -3104,5 +3103,3 @@ typedef void (*GDExtensionsInterfaceEditorHelpLoadXmlFromUtf8CharsAndLen)(const
 #ifdef __cplusplus
 }
 #endif
-
-#endif // GDEXTENSION_INTERFACE_H

+ 1 - 4
core/extension/gdextension_library_loader.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GDEXTENSION_LIBRARY_LOADER_H
-#define GDEXTENSION_LIBRARY_LOADER_H
+#pragma once
 
 #include <functional>
 
@@ -81,5 +80,3 @@ public:
 
 	Error parse_gdextension_file(const String &p_path);
 };
-
-#endif // GDEXTENSION_LIBRARY_LOADER_H

+ 1 - 4
core/extension/gdextension_loader.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GDEXTENSION_LOADER_H
-#define GDEXTENSION_LOADER_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 
@@ -44,5 +43,3 @@ public:
 	virtual bool has_library_changed() const = 0;
 	virtual bool library_exists() const = 0;
 };
-
-#endif // GDEXTENSION_LOADER_H

+ 1 - 4
core/extension/gdextension_manager.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GDEXTENSION_MANAGER_H
-#define GDEXTENSION_MANAGER_H
+#pragma once
 
 #include "core/extension/gdextension.h"
 
@@ -92,5 +91,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(GDExtensionManager::LoadStatus)
-
-#endif // GDEXTENSION_MANAGER_H

+ 1 - 4
core/extension/gdextension_special_compat_hashes.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GDEXTENSION_SPECIAL_COMPAT_HASHES_H
-#define GDEXTENSION_SPECIAL_COMPAT_HASHES_H
+#pragma once
 
 #ifndef DISABLE_DEPRECATED
 
@@ -58,5 +57,3 @@ public:
 };
 
 #endif // DISABLE_DEPRECATED
-
-#endif // GDEXTENSION_SPECIAL_COMPAT_HASHES_H

+ 1 - 4
core/extension/make_interface_dumper.py

@@ -14,8 +14,7 @@ def run(target, source, env):
 
         g.write(
             """/* THIS FILE IS GENERATED DO NOT EDIT */
-#ifndef GDEXTENSION_INTERFACE_DUMP_H
-#define GDEXTENSION_INTERFACE_DUMP_H
+#pragma once
 
 #ifdef TOOLS_ENABLED
 
@@ -49,7 +48,5 @@ class GDExtensionInterfaceDump {
 };
 
 #endif // TOOLS_ENABLED
-
-#endif // GDEXTENSION_INTERFACE_DUMP_H
 """
         )

+ 1 - 6
core/extension/make_wrappers.py

@@ -119,10 +119,7 @@ def generate_ex_version(argcount, const=False, returns=False):
 def run(target, source, env):
     max_versions = 12
 
-    txt = """
-#ifndef GDEXTENSION_WRAPPERS_GEN_H
-#define GDEXTENSION_WRAPPERS_GEN_H
-"""
+    txt = "#pragma once"
 
     for i in range(max_versions + 1):
         txt += "\n/* Extension Wrapper " + str(i) + " Arguments */\n"
@@ -138,7 +135,5 @@ def run(target, source, env):
         txt += generate_mod_version(i, True, False)
         txt += generate_mod_version(i, True, True)
 
-    txt += "\n#endif\n"
-
     with open(str(target[0]), "w", encoding="utf-8", newline="\n") as f:
         f.write(txt)

+ 1 - 4
core/input/default_controller_mappings.h

@@ -28,12 +28,9 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DEFAULT_CONTROLLER_MAPPINGS_H
-#define DEFAULT_CONTROLLER_MAPPINGS_H
+#pragma once
 
 class DefaultControllerMappings {
 public:
 	static const char *mappings[];
 };
-
-#endif // DEFAULT_CONTROLLER_MAPPINGS_H

+ 1 - 4
core/input/input.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef INPUT_H
-#define INPUT_H
+#pragma once
 
 #include "core/input/input_event.h"
 #include "core/object/object.h"
@@ -403,5 +402,3 @@ public:
 
 VARIANT_ENUM_CAST(Input::MouseMode);
 VARIANT_ENUM_CAST(Input::CursorShape);
-
-#endif // INPUT_H

+ 1 - 4
core/input/input_enums.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef INPUT_ENUMS_H
-#define INPUT_ENUMS_H
+#pragma once
 
 #include "core/error/error_macros.h"
 
@@ -137,5 +136,3 @@ inline MouseButtonMask mouse_button_to_mask(MouseButton button) {
 
 	return MouseButtonMask(1 << ((int)button - 1));
 }
-
-#endif // INPUT_ENUMS_H

+ 1 - 4
core/input/input_event.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef INPUT_EVENT_H
-#define INPUT_EVENT_H
+#pragma once
 
 #include "core/input/input_enums.h"
 #include "core/io/resource.h"
@@ -595,5 +594,3 @@ public:
 
 	InputEventShortcut();
 };
-
-#endif // INPUT_EVENT_H

+ 1 - 4
core/input/input_map.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef INPUT_MAP_H
-#define INPUT_MAP_H
+#pragma once
 
 #include "core/input/input_event.h"
 #include "core/object/class_db.h"
@@ -116,5 +115,3 @@ public:
 	InputMap();
 	~InputMap();
 };
-
-#endif // INPUT_MAP_H

+ 1 - 4
core/input/shortcut.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef SHORTCUT_H
-#define SHORTCUT_H
+#pragma once
 
 #include "core/input/input_event.h"
 #include "core/io/resource.h"
@@ -55,5 +54,3 @@ public:
 
 	static bool is_event_array_equal(const Array &p_event_array1, const Array &p_event_array2);
 };
-
-#endif // SHORTCUT_H

+ 1 - 4
core/io/compression.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef COMPRESSION_H
-#define COMPRESSION_H
+#pragma once
 
 #include "core/templates/vector.h"
 #include "core/typedefs.h"
@@ -56,5 +55,3 @@ public:
 	static int decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p_src, int p_src_size, Mode p_mode = MODE_ZSTD);
 	static int decompress_dynamic(Vector<uint8_t> *p_dst_vect, int p_max_dst_size, const uint8_t *p_src, int p_src_size, Mode p_mode);
 };
-
-#endif // COMPRESSION_H

+ 1 - 4
core/io/config_file.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CONFIG_FILE_H
-#define CONFIG_FILE_H
+#pragma once
 
 #include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
@@ -78,5 +77,3 @@ public:
 	Error save_encrypted(const String &p_path, const Vector<uint8_t> &p_key);
 	Error save_encrypted_pass(const String &p_path, const String &p_pass);
 };
-
-#endif // CONFIG_FILE_H

+ 1 - 4
core/io/dir_access.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DIR_ACCESS_H
-#define DIR_ACCESS_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 #include "core/string/ustring.h"
@@ -174,5 +173,3 @@ public:
 	DirAccess() {}
 	virtual ~DirAccess();
 };
-
-#endif // DIR_ACCESS_H

+ 1 - 4
core/io/dtls_server.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DTLS_SERVER_H
-#define DTLS_SERVER_H
+#pragma once
 
 #include "core/io/net_socket.h"
 #include "core/io/packet_peer_dtls.h"
@@ -53,5 +52,3 @@ public:
 
 	DTLSServer() {}
 };
-
-#endif // DTLS_SERVER_H

+ 1 - 4
core/io/file_access.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FILE_ACCESS_H
-#define FILE_ACCESS_H
+#pragma once
 
 #include "core/io/compression.h"
 #include "core/math/math_defs.h"
@@ -273,5 +272,3 @@ public:
 VARIANT_ENUM_CAST(FileAccess::CompressionMode);
 VARIANT_ENUM_CAST(FileAccess::ModeFlags);
 VARIANT_BITFIELD_CAST(FileAccess::UnixPermissionFlags);
-
-#endif // FILE_ACCESS_H

+ 1 - 4
core/io/file_access_compressed.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FILE_ACCESS_COMPRESSED_H
-#define FILE_ACCESS_COMPRESSED_H
+#pragma once
 
 #include "core/io/compression.h"
 #include "core/io/file_access.h"
@@ -107,5 +106,3 @@ public:
 	FileAccessCompressed() {}
 	virtual ~FileAccessCompressed();
 };
-
-#endif // FILE_ACCESS_COMPRESSED_H

+ 1 - 4
core/io/file_access_encrypted.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FILE_ACCESS_ENCRYPTED_H
-#define FILE_ACCESS_ENCRYPTED_H
+#pragma once
 
 #include "core/io/file_access.h"
 
@@ -100,5 +99,3 @@ public:
 	FileAccessEncrypted() {}
 	~FileAccessEncrypted();
 };
-
-#endif // FILE_ACCESS_ENCRYPTED_H

+ 1 - 4
core/io/file_access_memory.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FILE_ACCESS_MEMORY_H
-#define FILE_ACCESS_MEMORY_H
+#pragma once
 
 #include "core/io/file_access.h"
 
@@ -78,5 +77,3 @@ public:
 
 	FileAccessMemory() {}
 };
-
-#endif // FILE_ACCESS_MEMORY_H

+ 1 - 4
core/io/file_access_pack.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FILE_ACCESS_PACK_H
-#define FILE_ACCESS_PACK_H
+#pragma once
 
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
@@ -272,5 +271,3 @@ Ref<DirAccess> PackedData::try_open_directory(const String &p_path) {
 	}
 	return da;
 }
-
-#endif // FILE_ACCESS_PACK_H

+ 1 - 4
core/io/file_access_zip.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FILE_ACCESS_ZIP_H
-#define FILE_ACCESS_ZIP_H
+#pragma once
 
 #ifdef MINIZIP_ENABLED
 
@@ -118,5 +117,3 @@ public:
 };
 
 #endif // MINIZIP_ENABLED
-
-#endif // FILE_ACCESS_ZIP_H

+ 1 - 4
core/io/http_client.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef HTTP_CLIENT_H
-#define HTTP_CLIENT_H
+#pragma once
 
 #include "core/crypto/crypto.h"
 #include "core/io/ip.h"
@@ -205,5 +204,3 @@ public:
 VARIANT_ENUM_CAST(HTTPClient::ResponseCode)
 VARIANT_ENUM_CAST(HTTPClient::Method);
 VARIANT_ENUM_CAST(HTTPClient::Status);
-
-#endif // HTTP_CLIENT_H

+ 1 - 4
core/io/http_client_tcp.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef HTTP_CLIENT_TCP_H
-#define HTTP_CLIENT_TCP_H
+#pragma once
 
 #include "http_client.h"
 
@@ -100,5 +99,3 @@ public:
 	void set_https_proxy(const String &p_host, int p_port) override;
 	HTTPClientTCP();
 };
-
-#endif // HTTP_CLIENT_TCP_H

+ 1 - 4
core/io/image.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef IMAGE_H
-#define IMAGE_H
+#pragma once
 
 #include "core/io/resource.h"
 #include "core/math/color.h"
@@ -442,5 +441,3 @@ VARIANT_ENUM_CAST(Image::UsedChannels)
 VARIANT_ENUM_CAST(Image::AlphaMode)
 VARIANT_ENUM_CAST(Image::RoughnessChannel)
 VARIANT_ENUM_CAST(Image::ASTCFormat)
-
-#endif // IMAGE_H

+ 1 - 4
core/io/image_loader.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef IMAGE_LOADER_H
-#define IMAGE_LOADER_H
+#pragma once
 
 #include "core/core_bind.h"
 #include "core/io/file_access.h"
@@ -108,5 +107,3 @@ public:
 	virtual bool handles_type(const String &p_type) const override;
 	virtual String get_resource_type(const String &p_path) const override;
 };
-
-#endif // IMAGE_LOADER_H

+ 1 - 4
core/io/ip.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef IP_H
-#define IP_H
+#pragma once
 
 #include "core/io/ip_address.h"
 #include "core/os/os.h"
@@ -110,5 +109,3 @@ public:
 
 VARIANT_ENUM_CAST(IP::Type);
 VARIANT_ENUM_CAST(IP::ResolverStatus);
-
-#endif // IP_H

+ 1 - 4
core/io/ip_address.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef IP_ADDRESS_H
-#define IP_ADDRESS_H
+#pragma once
 
 #include "core/string/ustring.h"
 
@@ -95,5 +94,3 @@ public:
 	IPAddress(uint32_t p_a, uint32_t p_b, uint32_t p_c, uint32_t p_d, bool is_v6 = false);
 	IPAddress() { clear(); }
 };
-
-#endif // IP_ADDRESS_H

+ 1 - 4
core/io/json.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef JSON_H
-#define JSON_H
+#pragma once
 
 #include "core/io/resource.h"
 #include "core/io/resource_loader.h"
@@ -125,5 +124,3 @@ public:
 	virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
 	virtual bool recognize(const Ref<Resource> &p_resource) const override;
 };
-
-#endif // JSON_H

+ 1 - 4
core/io/logger.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef LOGGER_H
-#define LOGGER_H
+#pragma once
 
 #include "core/io/file_access.h"
 #include "core/string/ustring.h"
@@ -109,5 +108,3 @@ public:
 
 	virtual ~CompositeLogger();
 };
-
-#endif // LOGGER_H

+ 1 - 4
core/io/marshalls.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef MARSHALLS_H
-#define MARSHALLS_H
+#pragma once
 
 #include "core/math/math_defs.h"
 #include "core/object/ref_counted.h"
@@ -226,5 +225,3 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
 Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_full_objects = false, int p_depth = 0);
 
 Vector<float> vector3_to_float32_array(const Vector3 *vecs, size_t count);
-
-#endif // MARSHALLS_H

+ 1 - 4
core/io/missing_resource.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef MISSING_RESOURCE_H
-#define MISSING_RESOURCE_H
+#pragma once
 
 #include "core/io/resource.h"
 
@@ -61,5 +60,3 @@ public:
 
 	MissingResource();
 };
-
-#endif // MISSING_RESOURCE_H

+ 1 - 4
core/io/net_socket.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef NET_SOCKET_H
-#define NET_SOCKET_H
+#pragma once
 
 #include "core/io/ip.h"
 #include "core/object/ref_counted.h"
@@ -79,5 +78,3 @@ public:
 
 	virtual ~NetSocket() {}
 };
-
-#endif // NET_SOCKET_H

+ 1 - 4
core/io/packed_data_container.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PACKED_DATA_CONTAINER_H
-#define PACKED_DATA_CONTAINER_H
+#pragma once
 
 #include "core/io/resource.h"
 
@@ -100,5 +99,3 @@ public:
 
 	PackedDataContainerRef() {}
 };
-
-#endif // PACKED_DATA_CONTAINER_H

+ 1 - 4
core/io/packet_peer.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PACKET_PEER_H
-#define PACKET_PEER_H
+#pragma once
 
 #include "core/io/stream_peer.h"
 #include "core/object/class_db.h"
@@ -124,5 +123,3 @@ public:
 	int get_output_buffer_max_size() const;
 	PacketPeerStream();
 };
-
-#endif // PACKET_PEER_H

+ 1 - 4
core/io/packet_peer_dtls.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PACKET_PEER_DTLS_H
-#define PACKET_PEER_DTLS_H
+#pragma once
 
 #include "core/crypto/crypto.h"
 #include "core/io/packet_peer_udp.h"
@@ -64,5 +63,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(PacketPeerDTLS::Status);
-
-#endif // PACKET_PEER_DTLS_H

+ 1 - 4
core/io/packet_peer_udp.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PACKET_PEER_UDP_H
-#define PACKET_PEER_UDP_H
+#pragma once
 
 #include "core/io/ip.h"
 #include "core/io/net_socket.h"
@@ -97,5 +96,3 @@ public:
 	PacketPeerUDP();
 	~PacketPeerUDP();
 };
-
-#endif // PACKET_PEER_UDP_H

+ 1 - 4
core/io/pck_packer.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PCK_PACKER_H
-#define PCK_PACKER_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 
@@ -66,5 +65,3 @@ public:
 
 	PCKPacker() {}
 };
-
-#endif // PCK_PACKER_H

+ 1 - 4
core/io/plist.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef PLIST_H
-#define PLIST_H
+#pragma once
 
 // Property list file format (application/x-plist) parser, property list ASN-1 serialization.
 
@@ -122,5 +121,3 @@ public:
 	PListNode() {}
 	~PListNode() {}
 };
-
-#endif // PLIST_H

+ 1 - 4
core/io/remote_filesystem_client.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef REMOTE_FILESYSTEM_CLIENT_H
-#define REMOTE_FILESYSTEM_CLIENT_H
+#pragma once
 
 #include "core/string/ustring.h"
 #include "core/templates/hash_set.h"
@@ -60,5 +59,3 @@ public:
 	Error synchronize_with_server(const String &p_host, int p_port, const String &p_password, String &r_cache_path);
 	virtual ~RemoteFilesystemClient() {}
 };
-
-#endif // REMOTE_FILESYSTEM_CLIENT_H

+ 1 - 4
core/io/resource.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef RESOURCE_H
-#define RESOURCE_H
+#pragma once
 
 #include "core/io/resource_uid.h"
 #include "core/object/class_db.h"
@@ -179,5 +178,3 @@ public:
 	static void get_cached_resources(List<Ref<Resource>> *p_resources);
 	static int get_cached_resource_count();
 };
-
-#endif // RESOURCE_H

+ 1 - 4
core/io/resource_format_binary.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef RESOURCE_FORMAT_BINARY_H
-#define RESOURCE_FORMAT_BINARY_H
+#pragma once
 
 #include "core/io/file_access.h"
 #include "core/io/resource_loader.h"
@@ -189,5 +188,3 @@ public:
 
 	ResourceFormatSaverBinary();
 };
-
-#endif // RESOURCE_FORMAT_BINARY_H

+ 1 - 4
core/io/resource_importer.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef RESOURCE_IMPORTER_H
-#define RESOURCE_IMPORTER_H
+#pragma once
 
 #include "core/io/resource_loader.h"
 #include "core/io/resource_saver.h"
@@ -166,5 +165,3 @@ class ResourceFormatImporterSaver : public ResourceFormatSaver {
 public:
 	virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid) override;
 };
-
-#endif // RESOURCE_IMPORTER_H

+ 1 - 4
core/io/resource_loader.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef RESOURCE_LOADER_H
-#define RESOURCE_LOADER_H
+#pragma once
 
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
@@ -316,5 +315,3 @@ public:
 	static void initialize();
 	static void finalize();
 };
-
-#endif // RESOURCE_LOADER_H

+ 1 - 4
core/io/resource_saver.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef RESOURCE_SAVER_H
-#define RESOURCE_SAVER_H
+#pragma once
 
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
@@ -103,5 +102,3 @@ public:
 	static void add_custom_savers();
 	static void remove_custom_savers();
 };
-
-#endif // RESOURCE_SAVER_H

+ 1 - 4
core/io/resource_uid.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef RESOURCE_UID_H
-#define RESOURCE_UID_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 #include "core/string/string_name.h"
@@ -93,5 +92,3 @@ public:
 	ResourceUID();
 	~ResourceUID();
 };
-
-#endif // RESOURCE_UID_H

+ 1 - 4
core/io/stream_peer.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef STREAM_PEER_H
-#define STREAM_PEER_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 
@@ -152,5 +151,3 @@ public:
 
 	StreamPeerBuffer() {}
 };
-
-#endif // STREAM_PEER_H

+ 1 - 4
core/io/stream_peer_gzip.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef STREAM_PEER_GZIP_H
-#define STREAM_PEER_GZIP_H
+#pragma once
 
 #include "core/io/stream_peer.h"
 
@@ -72,5 +71,3 @@ public:
 	StreamPeerGZIP();
 	~StreamPeerGZIP();
 };
-
-#endif // STREAM_PEER_GZIP_H

+ 1 - 4
core/io/stream_peer_tcp.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef STREAM_PEER_TCP_H
-#define STREAM_PEER_TCP_H
+#pragma once
 
 #include "core/io/ip.h"
 #include "core/io/ip_address.h"
@@ -92,5 +91,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(StreamPeerTCP::Status);
-
-#endif // STREAM_PEER_TCP_H

+ 1 - 4
core/io/stream_peer_tls.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef STREAM_PEER_TLS_H
-#define STREAM_PEER_TLS_H
+#pragma once
 
 #include "core/crypto/crypto.h"
 #include "core/io/stream_peer.h"
@@ -66,5 +65,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(StreamPeerTLS::Status);
-
-#endif // STREAM_PEER_TLS_H

+ 1 - 4
core/io/tcp_server.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef TCP_SERVER_H
-#define TCP_SERVER_H
+#pragma once
 
 #include "core/io/ip.h"
 #include "core/io/net_socket.h"
@@ -59,5 +58,3 @@ public:
 	TCPServer();
 	~TCPServer();
 };
-
-#endif // TCP_SERVER_H

+ 1 - 4
core/io/translation_loader_po.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef TRANSLATION_LOADER_PO_H
-#define TRANSLATION_LOADER_PO_H
+#pragma once
 
 #include "core/io/file_access.h"
 #include "core/io/resource_loader.h"
@@ -49,5 +48,3 @@ public:
 
 	TranslationLoaderPO() {}
 };
-
-#endif // TRANSLATION_LOADER_PO_H

+ 1 - 4
core/io/udp_server.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef UDP_SERVER_H
-#define UDP_SERVER_H
+#pragma once
 
 #include "core/io/net_socket.h"
 #include "core/io/packet_peer_udp.h"
@@ -76,5 +75,3 @@ public:
 	UDPServer();
 	~UDPServer();
 };
-
-#endif // UDP_SERVER_H

+ 1 - 4
core/io/xml_parser.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef XML_PARSER_H
-#define XML_PARSER_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 #include "core/string/ustring.h"
@@ -126,5 +125,3 @@ public:
 };
 
 VARIANT_ENUM_CAST(XMLParser::NodeType);
-
-#endif // XML_PARSER_H

+ 1 - 4
core/io/zip_io.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef ZIP_IO_H
-#define ZIP_IO_H
+#pragma once
 
 #include "core/io/file_access.h"
 
@@ -61,5 +60,3 @@ voidpf zipio_alloc(voidpf opaque, uInt items, uInt size);
 void zipio_free(voidpf opaque, voidpf address);
 
 zlib_filefunc_def zipio_create_io(Ref<FileAccess> *p_data);
-
-#endif // ZIP_IO_H

+ 1 - 4
core/math/a_star.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef A_STAR_H
-#define A_STAR_H
+#pragma once
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
@@ -222,5 +221,3 @@ public:
 	AStar2D() {}
 	~AStar2D() {}
 };
-
-#endif // A_STAR_H

+ 1 - 4
core/math/a_star_grid_2d.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef A_STAR_GRID_2D_H
-#define A_STAR_GRID_2D_H
+#pragma once
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
@@ -230,5 +229,3 @@ public:
 VARIANT_ENUM_CAST(AStarGrid2D::DiagonalMode);
 VARIANT_ENUM_CAST(AStarGrid2D::Heuristic);
 VARIANT_ENUM_CAST(AStarGrid2D::CellShape)
-
-#endif // A_STAR_GRID_2D_H

+ 1 - 4
core/math/aabb.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef AABB_H
-#define AABB_H
+#pragma once
 
 #include "core/math/plane.h"
 #include "core/math/vector3.h"
@@ -495,5 +494,3 @@ AABB AABB::quantized(real_t p_unit) const {
 	ret.quantize(p_unit);
 	return ret;
 }
-
-#endif // AABB_H

+ 1 - 4
core/math/audio_frame.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef AUDIO_FRAME_H
-#define AUDIO_FRAME_H
+#pragma once
 
 #include "core/math/vector2.h"
 #include "core/typedefs.h"
@@ -169,5 +168,3 @@ _ALWAYS_INLINE_ AudioFrame operator*(int32_t p_scalar, const AudioFrame &p_frame
 _ALWAYS_INLINE_ AudioFrame operator*(int64_t p_scalar, const AudioFrame &p_frame) {
 	return AudioFrame(p_frame.left * p_scalar, p_frame.right * p_scalar);
 }
-
-#endif // AUDIO_FRAME_H

+ 1 - 4
core/math/basis.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef BASIS_H
-#define BASIS_H
+#pragma once
 
 #include "core/math/quaternion.h"
 #include "core/math/vector3.h"
@@ -322,5 +321,3 @@ real_t Basis::determinant() const {
 			rows[1][0] * (rows[0][1] * rows[2][2] - rows[2][1] * rows[0][2]) +
 			rows[2][0] * (rows[0][1] * rows[1][2] - rows[1][1] * rows[0][2]);
 }
-
-#endif // BASIS_H

+ 1 - 4
core/math/bvh.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef BVH_H
-#define BVH_H
+#pragma once
 
 // BVH
 // This class provides a wrapper around BVH tree, which contains most of the functionality
@@ -806,5 +805,3 @@ public:
 };
 
 #undef BVHTREE_CLASS
-
-#endif // BVH_H

+ 1 - 4
core/math/bvh_abb.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef BVH_ABB_H
-#define BVH_ABB_H
+#pragma once
 
 // special optimized version of axis aligned bounding box
 template <typename BOUNDS = AABB, typename POINT = Vector3>
@@ -288,5 +287,3 @@ struct BVH_ABB {
 		return false;
 	}
 };
-
-#endif // BVH_ABB_H

+ 1 - 4
core/math/bvh_tree.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef BVH_TREE_H
-#define BVH_TREE_H
+#pragma once
 
 // BVH Tree
 // This is an implementation of a dynamic BVH with templated leaf size.
@@ -454,5 +453,3 @@ private:
 };
 
 #undef VERBOSE_PRINT
-
-#endif // BVH_TREE_H

+ 1 - 4
core/math/color.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef COLOR_H
-#define COLOR_H
+#pragma once
 
 #include "core/math/math_funcs.h"
 
@@ -301,5 +300,3 @@ bool Color::operator<(const Color &p_color) const {
 _FORCE_INLINE_ Color operator*(float p_scalar, const Color &p_color) {
 	return p_color * p_scalar;
 }
-
-#endif // COLOR_H

+ 2 - 0
core/math/color_names.inc

@@ -28,6 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
+#pragma once
+
 // Names from https://en.wikipedia.org/wiki/X11_color_names
 
 // So this in a way that does not require memory allocation

+ 1 - 4
core/math/convex_hull.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef CONVEX_HULL_H
-#define CONVEX_HULL_H
+#pragma once
 
 /*
 Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net
@@ -112,5 +111,3 @@ public:
 
 	static Error convex_hull(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_mesh);
 };
-
-#endif // CONVEX_HULL_H

+ 1 - 4
core/math/delaunay_2d.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DELAUNAY_2D_H
-#define DELAUNAY_2D_H
+#pragma once
 
 #include "core/math/rect2.h"
 #include "core/templates/vector.h"
@@ -156,5 +155,3 @@ public:
 		return triangles;
 	}
 };
-
-#endif // DELAUNAY_2D_H

+ 1 - 4
core/math/delaunay_3d.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DELAUNAY_3D_H
-#define DELAUNAY_3D_H
+#pragma once
 
 #include "core/io/file_access.h"
 #include "core/math/aabb.h"
@@ -389,5 +388,3 @@ public:
 		return ret_simplices;
 	}
 };
-
-#endif // DELAUNAY_3D_H

+ 1 - 4
core/math/disjoint_set.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DISJOINT_SET_H
-#define DISJOINT_SET_H
+#pragma once
 
 #include "core/templates/rb_map.h"
 #include "core/templates/vector.h"
@@ -146,5 +145,3 @@ void DisjointSet<T, H, C, AL>::get_members(Vector<T> &out_members, T representat
 		}
 	}
 }
-
-#endif // DISJOINT_SET_H

+ 1 - 4
core/math/dynamic_bvh.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef DYNAMIC_BVH_H
-#define DYNAMIC_BVH_H
+#pragma once
 
 #include "core/math/aabb.h"
 #include "core/templates/list.h"
@@ -474,5 +473,3 @@ void DynamicBVH::ray_query(const Vector3 &p_from, const Vector3 &p_to, QueryResu
 		}
 	} while (depth > 0);
 }
-
-#endif // DYNAMIC_BVH_H

+ 1 - 4
core/math/expression.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef EXPRESSION_H
-#define EXPRESSION_H
+#pragma once
 
 #include "core/object/ref_counted.h"
 
@@ -271,5 +270,3 @@ public:
 	Expression() {}
 	~Expression();
 };
-
-#endif // EXPRESSION_H

+ 1 - 4
core/math/face3.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef FACE3_H
-#define FACE3_H
+#pragma once
 
 #include "core/math/aabb.h"
 #include "core/math/plane.h"
@@ -237,5 +236,3 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
 	}
 	return true;
 }
-
-#endif // FACE3_H

+ 1 - 4
core/math/geometry_2d.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GEOMETRY_2D_H
-#define GEOMETRY_2D_H
+#pragma once
 
 #include "core/math/delaunay_2d.h"
 #include "core/math/math_funcs.h"
@@ -498,5 +497,3 @@ private:
 	static Vector<Vector<Point2>> _polypaths_do_operation(PolyBooleanOperation p_op, const Vector<Point2> &p_polypath_a, const Vector<Point2> &p_polypath_b, bool is_a_open = false);
 	static Vector<Vector<Point2>> _polypath_offset(const Vector<Point2> &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type);
 };
-
-#endif // GEOMETRY_2D_H

+ 1 - 4
core/math/geometry_3d.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef GEOMETRY_3D_H
-#define GEOMETRY_3D_H
+#pragma once
 
 #include "core/math/delaunay_3d.h"
 #include "core/math/face3.h"
@@ -840,5 +839,3 @@ public:
 		return n.normalized();
 	}
 };
-
-#endif // GEOMETRY_3D_H

+ 1 - 4
core/math/math_defs.h

@@ -28,8 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 
-#ifndef MATH_DEFS_H
-#define MATH_DEFS_H
+#pragma once
 
 #define CMP_EPSILON 0.00001
 #define CMP_EPSILON2 (CMP_EPSILON * CMP_EPSILON)
@@ -136,5 +135,3 @@ typedef double real_t;
 #else
 typedef float real_t;
 #endif
-
-#endif // MATH_DEFS_H

Some files were not shown because too many files changed in this diff