diff --git a/core/config/engine.h b/core/config/engine.h index ec5fb955ac4..701cfda5667 100644 --- a/core/config/engine.h +++ b/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 diff --git a/core/config/project_settings.h b/core/config/project_settings.h index 02049290f6b..af4a3dcecef 100644 --- a/core/config/project_settings.h +++ b/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 diff --git a/core/core_bind.h b/core/core_bind.h index b96dc56b0dc..76cc420393a 100644 --- a/core/core_bind.h +++ b/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 diff --git a/core/core_constants.h b/core/core_constants.h index 8ab4a78a3b4..c432fdca3b1 100644 --- a/core/core_constants.h +++ b/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 *p_values); }; - -#endif // CORE_CONSTANTS_H diff --git a/core/core_globals.h b/core/core_globals.h index ebb1f41a744..63a6a5b1739 100644 --- a/core/core_globals.h +++ b/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 diff --git a/core/core_string_names.h b/core/core_string_names.h index be3bc38e70a..33203c5b005 100644 --- a/core/core_string_names.h +++ b/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 diff --git a/core/crypto/aes_context.h b/core/crypto/aes_context.h index ab0792ac8be..2ae62c84159 100644 --- a/core/crypto/aes_context.h +++ b/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 diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h index dc4441c9b88..9c752e77ea8 100644 --- a/core/crypto/crypto.h +++ b/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 &p_resource, List *p_extensions) const override; virtual bool recognize(const Ref &p_resource) const override; }; - -#endif // CRYPTO_H diff --git a/core/crypto/crypto_core.h b/core/crypto/crypto_core.h index 4a9ffda8426..75455eb9dda 100644 --- a/core/crypto/crypto_core.h +++ b/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 diff --git a/core/crypto/hashing_context.h b/core/crypto/hashing_context.h index 436afd837ee..6c9de6a818d 100644 --- a/core/crypto/hashing_context.h +++ b/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 diff --git a/core/debugger/debugger_marshalls.h b/core/debugger/debugger_marshalls.h index 1072ddaeb7f..c661ef39fd7 100644 --- a/core/debugger/debugger_marshalls.h +++ b/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 &p_shortcut); static Ref deserialize_key_shortcut(const Array &p_keys); }; - -#endif // DEBUGGER_MARSHALLS_H diff --git a/core/debugger/engine_debugger.h b/core/debugger/engine_debugger.h index 1822915f440..0be50451b07 100644 --- a/core/debugger/engine_debugger.h +++ b/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 diff --git a/core/debugger/engine_profiler.h b/core/debugger/engine_profiler.h index d3d0021e677..f74d20b814f 100644 --- a/core/debugger/engine_profiler.h +++ b/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 diff --git a/core/debugger/local_debugger.h b/core/debugger/local_debugger.h index 13c975c4bd8..5c603e5f86f 100644 --- a/core/debugger/local_debugger.h +++ b/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 diff --git a/core/debugger/remote_debugger.h b/core/debugger/remote_debugger.h index e91d09be175..cbac22577f3 100644 --- a/core/debugger/remote_debugger.h +++ b/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 p_peer); ~RemoteDebugger(); }; - -#endif // REMOTE_DEBUGGER_H diff --git a/core/debugger/remote_debugger_peer.h b/core/debugger/remote_debugger_peer.h index 37da0a927e4..3b171e4b48e 100644 --- a/core/debugger/remote_debugger_peer.h +++ b/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 p_stream = Ref()); ~RemoteDebuggerPeerTCP(); }; - -#endif // REMOTE_DEBUGGER_PEER_H diff --git a/core/debugger/script_debugger.h b/core/debugger/script_debugger.h index fb786f1b94a..38d1a5b631a 100644 --- a/core/debugger/script_debugger.h +++ b/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 get_error_stack_info() const; ScriptDebugger() {} }; - -#endif // SCRIPT_DEBUGGER_H diff --git a/core/doc_data.h b/core/doc_data.h index 49f9c3aa149..5611911a0fe 100644 --- a/core/doc_data.h +++ b/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 diff --git a/core/error/error_list.h b/core/error/error_list.h index cdf06eb06d7..cdc31ecd586 100644 --- a/core/error/error_list.h +++ b/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 diff --git a/core/error/error_macros.h b/core/error/error_macros.h index 752fd605e0a..1ebf1753a69 100644 --- a/core/error/error_macros.h +++ b/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 diff --git a/core/extension/extension_api_dump.h b/core/extension/extension_api_dump.h index 204a115f841..027a8d916e0 100644 --- a/core/extension/extension_api_dump.h +++ b/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 diff --git a/core/extension/gdextension.h b/core/extension/gdextension.h index bfed8424b94..dba13ae9305 100644 --- a/core/extension/gdextension.h +++ b/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 diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index efaa3f6fc59..27771430bda 100644 --- a/core/extension/gdextension_interface.h +++ b/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 diff --git a/core/extension/gdextension_library_loader.h b/core/extension/gdextension_library_loader.h index f781611b305..12107d3a688 100644 --- a/core/extension/gdextension_library_loader.h +++ b/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 @@ -81,5 +80,3 @@ public: Error parse_gdextension_file(const String &p_path); }; - -#endif // GDEXTENSION_LIBRARY_LOADER_H diff --git a/core/extension/gdextension_loader.h b/core/extension/gdextension_loader.h index 22895503291..23155ed1e36 100644 --- a/core/extension/gdextension_loader.h +++ b/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 diff --git a/core/extension/gdextension_manager.h b/core/extension/gdextension_manager.h index 39a600474cd..1523c07c32e 100644 --- a/core/extension/gdextension_manager.h +++ b/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 diff --git a/core/extension/gdextension_special_compat_hashes.h b/core/extension/gdextension_special_compat_hashes.h index 0d44789779c..9cfb9208564 100644 --- a/core/extension/gdextension_special_compat_hashes.h +++ b/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 diff --git a/core/input/default_controller_mappings.h b/core/input/default_controller_mappings.h index 34e7d5d81f2..6d7c807a516 100644 --- a/core/input/default_controller_mappings.h +++ b/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 diff --git a/core/input/input.h b/core/input/input.h index bbe185de3cb..8fc1b9c5dac 100644 --- a/core/input/input.h +++ b/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 diff --git a/core/input/input_enums.h b/core/input/input_enums.h index 182a5aabe54..16ddd0c474b 100644 --- a/core/input/input_enums.h +++ b/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 diff --git a/core/input/input_event.h b/core/input/input_event.h index 19176f748e9..3aa2ad8afba 100644 --- a/core/input/input_event.h +++ b/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 diff --git a/core/input/input_map.h b/core/input/input_map.h index 520c10c46e0..9b89281b5cf 100644 --- a/core/input/input_map.h +++ b/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 diff --git a/core/input/shortcut.h b/core/input/shortcut.h index 4109e31f239..5c0548276a0 100644 --- a/core/input/shortcut.h +++ b/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 diff --git a/core/io/compression.h b/core/io/compression.h index ea56ab8eb2a..08468de9d2e 100644 --- a/core/io/compression.h +++ b/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 *p_dst_vect, int p_max_dst_size, const uint8_t *p_src, int p_src_size, Mode p_mode); }; - -#endif // COMPRESSION_H diff --git a/core/io/config_file.h b/core/io/config_file.h index 05b4ed899e9..01a860becf5 100644 --- a/core/io/config_file.h +++ b/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 &p_key); Error save_encrypted_pass(const String &p_path, const String &p_pass); }; - -#endif // CONFIG_FILE_H diff --git a/core/io/dir_access.h b/core/io/dir_access.h index 588e03774b4..f9e1ee10346 100644 --- a/core/io/dir_access.h +++ b/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 diff --git a/core/io/dtls_server.h b/core/io/dtls_server.h index 5ffed1ecc38..e22a0eff8f0 100644 --- a/core/io/dtls_server.h +++ b/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 diff --git a/core/io/file_access.h b/core/io/file_access.h index f53f1f183a5..7c8bddf402d 100644 --- a/core/io/file_access.h +++ b/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 diff --git a/core/io/file_access_compressed.h b/core/io/file_access_compressed.h index 607a45fc0a0..6bc8870f857 100644 --- a/core/io/file_access_compressed.h +++ b/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 diff --git a/core/io/file_access_encrypted.h b/core/io/file_access_encrypted.h index 570955b7835..75844b83aac 100644 --- a/core/io/file_access_encrypted.h +++ b/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 diff --git a/core/io/file_access_memory.h b/core/io/file_access_memory.h index 6845cf7130d..e9e6ab39ce2 100644 --- a/core/io/file_access_memory.h +++ b/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 diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 0e4e7cd2893..bfd2083872b 100644 --- a/core/io/file_access_pack.h +++ b/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 PackedData::try_open_directory(const String &p_path) { } return da; } - -#endif // FILE_ACCESS_PACK_H diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index a1544feefa3..295d391cb82 100644 --- a/core/io/file_access_zip.h +++ b/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 diff --git a/core/io/http_client.h b/core/io/http_client.h index 59452911221..fe2f2df2895 100644 --- a/core/io/http_client.h +++ b/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 diff --git a/core/io/http_client_tcp.h b/core/io/http_client_tcp.h index dd6cc6b84f0..4e4db3acd9e 100644 --- a/core/io/http_client_tcp.h +++ b/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 diff --git a/core/io/image.h b/core/io/image.h index 992c43597df..9483f954093 100644 --- a/core/io/image.h +++ b/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 diff --git a/core/io/image_loader.h b/core/io/image_loader.h index 26af650344d..00642da083a 100644 --- a/core/io/image_loader.h +++ b/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 diff --git a/core/io/ip.h b/core/io/ip.h index 4816d59ac2d..9d23a465b5c 100644 --- a/core/io/ip.h +++ b/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 diff --git a/core/io/ip_address.h b/core/io/ip_address.h index da7b0f77db1..d296e50f7f9 100644 --- a/core/io/ip_address.h +++ b/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 diff --git a/core/io/json.h b/core/io/json.h index 70baf2895b7..9169e57862d 100644 --- a/core/io/json.h +++ b/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 &p_resource, List *p_extensions) const override; virtual bool recognize(const Ref &p_resource) const override; }; - -#endif // JSON_H diff --git a/core/io/logger.h b/core/io/logger.h index e55f73f6305..f3d8acade5e 100644 --- a/core/io/logger.h +++ b/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 diff --git a/core/io/marshalls.h b/core/io/marshalls.h index 82c760c28d2..1d057d4d341 100644 --- a/core/io/marshalls.h +++ b/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 vector3_to_float32_array(const Vector3 *vecs, size_t count); - -#endif // MARSHALLS_H diff --git a/core/io/missing_resource.h b/core/io/missing_resource.h index 4cded5ca247..702cd3b3b1f 100644 --- a/core/io/missing_resource.h +++ b/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 diff --git a/core/io/net_socket.h b/core/io/net_socket.h index 49b23575a79..49671ece6cf 100644 --- a/core/io/net_socket.h +++ b/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 diff --git a/core/io/packed_data_container.h b/core/io/packed_data_container.h index f4ffa090223..8d25d5c9487 100644 --- a/core/io/packed_data_container.h +++ b/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 diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index 86ebe32cb6f..91d3bc442b1 100644 --- a/core/io/packet_peer.h +++ b/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 diff --git a/core/io/packet_peer_dtls.h b/core/io/packet_peer_dtls.h index 03d97a59036..5de9640dd54 100644 --- a/core/io/packet_peer_dtls.h +++ b/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 diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h index c69a138c53a..1c909860c5e 100644 --- a/core/io/packet_peer_udp.h +++ b/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 diff --git a/core/io/pck_packer.h b/core/io/pck_packer.h index 043a1dbdb86..4c386b36a28 100644 --- a/core/io/pck_packer.h +++ b/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 diff --git a/core/io/plist.h b/core/io/plist.h index 7b3199060f4..30bebe66654 100644 --- a/core/io/plist.h +++ b/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 diff --git a/core/io/remote_filesystem_client.h b/core/io/remote_filesystem_client.h index f96c263c585..6b4db9b56dc 100644 --- a/core/io/remote_filesystem_client.h +++ b/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 diff --git a/core/io/resource.h b/core/io/resource.h index ebc82ceebf9..bf90937d54f 100644 --- a/core/io/resource.h +++ b/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> *p_resources); static int get_cached_resource_count(); }; - -#endif // RESOURCE_H diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h index ec8d7ead5d2..dfd2cd6f55a 100644 --- a/core/io/resource_format_binary.h +++ b/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 diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 1d00ef3b824..4b272602e23 100644 --- a/core/io/resource_importer.h +++ b/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 diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index 10a82e811d0..20bffc076c5 100644 --- a/core/io/resource_loader.h +++ b/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 diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h index 3e0821926a5..5602a3a422f 100644 --- a/core/io/resource_saver.h +++ b/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 diff --git a/core/io/resource_uid.h b/core/io/resource_uid.h index 2912168dcb4..06196212e27 100644 --- a/core/io/resource_uid.h +++ b/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 diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index 44bbfbf1d52..0bda96d0961 100644 --- a/core/io/stream_peer.h +++ b/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 diff --git a/core/io/stream_peer_gzip.h b/core/io/stream_peer_gzip.h index a2e25ea4227..394fd61382b 100644 --- a/core/io/stream_peer_gzip.h +++ b/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 diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h index d7da7503f9a..80097a663a4 100644 --- a/core/io/stream_peer_tcp.h +++ b/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 diff --git a/core/io/stream_peer_tls.h b/core/io/stream_peer_tls.h index 3e03e25a2d4..80a481153e3 100644 --- a/core/io/stream_peer_tls.h +++ b/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 diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h index 472d86f36a1..943d4c6f1d2 100644 --- a/core/io/tcp_server.h +++ b/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 diff --git a/core/io/translation_loader_po.h b/core/io/translation_loader_po.h index 1f9782c4253..5ed0e1f5d45 100644 --- a/core/io/translation_loader_po.h +++ b/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 diff --git a/core/io/udp_server.h b/core/io/udp_server.h index 39b7fd989f4..9edf4318db2 100644 --- a/core/io/udp_server.h +++ b/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 diff --git a/core/io/xml_parser.h b/core/io/xml_parser.h index a14bdee5710..911d2b11b26 100644 --- a/core/io/xml_parser.h +++ b/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 diff --git a/core/io/zip_io.h b/core/io/zip_io.h index cd5c873c4b5..82004d9ca3f 100644 --- a/core/io/zip_io.h +++ b/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 *p_data); - -#endif // ZIP_IO_H diff --git a/core/math/a_star.h b/core/math/a_star.h index e510923bd0f..d7e0f3fd6ce 100644 --- a/core/math/a_star.h +++ b/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 diff --git a/core/math/a_star_grid_2d.h b/core/math/a_star_grid_2d.h index ae6f3a1fc99..4883c09206a 100644 --- a/core/math/a_star_grid_2d.h +++ b/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 diff --git a/core/math/aabb.h b/core/math/aabb.h index 7a5581b5d45..39a62e3dbdd 100644 --- a/core/math/aabb.h +++ b/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 diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h index e205126cdf6..4dd514c65ce 100644 --- a/core/math/audio_frame.h +++ b/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 diff --git a/core/math/basis.h b/core/math/basis.h index 2d4994de197..597e7113997 100644 --- a/core/math/basis.h +++ b/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 diff --git a/core/math/bvh.h b/core/math/bvh.h index 4815466e896..f24da605df1 100644 --- a/core/math/bvh.h +++ b/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 diff --git a/core/math/bvh_abb.h b/core/math/bvh_abb.h index 3d32c250c96..8fa4d55e2e0 100644 --- a/core/math/bvh_abb.h +++ b/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 @@ -288,5 +287,3 @@ struct BVH_ABB { return false; } }; - -#endif // BVH_ABB_H diff --git a/core/math/bvh_tree.h b/core/math/bvh_tree.h index 2a2a6d6715a..004eef7ffdc 100644 --- a/core/math/bvh_tree.h +++ b/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 diff --git a/core/math/color.h b/core/math/color.h index c2ffde1849c..72ca7a7aa8a 100644 --- a/core/math/color.h +++ b/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 diff --git a/core/math/color_names.inc b/core/math/color_names.inc index 6c0d2a4bfd8..a9162e369cc 100644 --- a/core/math/color_names.inc +++ b/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 diff --git a/core/math/convex_hull.h b/core/math/convex_hull.h index 75787f7bb53..9af39790321 100644 --- a/core/math/convex_hull.h +++ b/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 &p_points, Geometry3D::MeshData &r_mesh); }; - -#endif // CONVEX_HULL_H diff --git a/core/math/delaunay_2d.h b/core/math/delaunay_2d.h index 0bc67a92f63..cb0eca2bfa2 100644 --- a/core/math/delaunay_2d.h +++ b/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 diff --git a/core/math/delaunay_3d.h b/core/math/delaunay_3d.h index 5bbdcc093e9..a841d5c0398 100644 --- a/core/math/delaunay_3d.h +++ b/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 diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h index 4348da992d2..a5c7d2b2eb2 100644 --- a/core/math/disjoint_set.h +++ b/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::get_members(Vector &out_members, T representat } } } - -#endif // DISJOINT_SET_H diff --git a/core/math/dynamic_bvh.h b/core/math/dynamic_bvh.h index 26fc517f7f9..10e4e0637a4 100644 --- a/core/math/dynamic_bvh.h +++ b/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 diff --git a/core/math/expression.h b/core/math/expression.h index 46bc3618df0..aea714cfbed 100644 --- a/core/math/expression.h +++ b/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 diff --git a/core/math/face3.h b/core/math/face3.h index 519dcb6414e..0aae49fcd12 100644 --- a/core/math/face3.h +++ b/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 diff --git a/core/math/geometry_2d.h b/core/math/geometry_2d.h index abd395d8dfb..56ab9ceaa45 100644 --- a/core/math/geometry_2d.h +++ b/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> _polypaths_do_operation(PolyBooleanOperation p_op, const Vector &p_polypath_a, const Vector &p_polypath_b, bool is_a_open = false); static Vector> _polypath_offset(const Vector &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type); }; - -#endif // GEOMETRY_2D_H diff --git a/core/math/geometry_3d.h b/core/math/geometry_3d.h index ff39d825958..26237a50bea 100644 --- a/core/math/geometry_3d.h +++ b/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 diff --git a/core/math/math_defs.h b/core/math/math_defs.h index fe53121a038..72fbf7b9f58 100644 --- a/core/math/math_defs.h +++ b/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 diff --git a/core/math/math_fieldwise.h b/core/math/math_fieldwise.h index 6d222c15781..8519e9d4308 100644 --- a/core/math/math_fieldwise.h +++ b/core/math/math_fieldwise.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef MATH_FIELDWISE_H -#define MATH_FIELDWISE_H +#pragma once #ifdef TOOLS_ENABLED @@ -38,5 +37,3 @@ Variant fieldwise_assign(const Variant &p_target, const Variant &p_source, const String &p_field); #endif // TOOLS_ENABLED - -#endif // MATH_FIELDWISE_H diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index 1afc5f4bbbd..419bb1222af 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef MATH_FUNCS_H -#define MATH_FUNCS_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_defs.h" @@ -758,5 +757,3 @@ public: return p_target; } }; - -#endif // MATH_FUNCS_H diff --git a/core/math/plane.h b/core/math/plane.h index 65783ff4cfc..d1370db2eef 100644 --- a/core/math/plane.h +++ b/core/math/plane.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef PLANE_H -#define PLANE_H +#pragma once #include "core/math/vector3.h" @@ -132,5 +131,3 @@ bool Plane::operator==(const Plane &p_plane) const { bool Plane::operator!=(const Plane &p_plane) const { return normal != p_plane.normal || d != p_plane.d; } - -#endif // PLANE_H diff --git a/core/math/projection.h b/core/math/projection.h index 5af43561c0c..ad3dda1b7cd 100644 --- a/core/math/projection.h +++ b/core/math/projection.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef PROJECTION_H -#define PROJECTION_H +#pragma once #include "core/math/vector3.h" #include "core/math/vector4.h" @@ -164,5 +163,3 @@ Vector3 Projection::xform(const Vector3 &p_vec3) const { real_t w = columns[0][3] * p_vec3.x + columns[1][3] * p_vec3.y + columns[2][3] * p_vec3.z + columns[3][3]; return ret / w; } - -#endif // PROJECTION_H diff --git a/core/math/quaternion.h b/core/math/quaternion.h index 58a4ec5b74d..cb60d78d378 100644 --- a/core/math/quaternion.h +++ b/core/math/quaternion.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef QUATERNION_H -#define QUATERNION_H +#pragma once #include "core/math/math_funcs.h" #include "core/math/vector3.h" @@ -237,5 +236,3 @@ bool Quaternion::operator!=(const Quaternion &p_quaternion) const { _FORCE_INLINE_ Quaternion operator*(real_t p_real, const Quaternion &p_quaternion) { return p_quaternion * p_real; } - -#endif // QUATERNION_H diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h index f4891a7c61e..e374211d5ea 100644 --- a/core/math/quick_hull.h +++ b/core/math/quick_hull.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef QUICK_HULL_H -#define QUICK_HULL_H +#pragma once #include "core/math/geometry_3d.h" #include "core/templates/list.h" @@ -89,5 +88,3 @@ public: static uint32_t debug_stop_after; static Error build(const Vector &p_points, Geometry3D::MeshData &r_mesh); }; - -#endif // QUICK_HULL_H diff --git a/core/math/random_number_generator.h b/core/math/random_number_generator.h index 7ec4cdffb0e..aa21b41a23f 100644 --- a/core/math/random_number_generator.h +++ b/core/math/random_number_generator.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RANDOM_NUMBER_GENERATOR_H -#define RANDOM_NUMBER_GENERATOR_H +#pragma once #include "core/math/random_pcg.h" #include "core/object/ref_counted.h" @@ -61,5 +60,3 @@ public: RandomNumberGenerator() { randbase.randomize(); } }; - -#endif // RANDOM_NUMBER_GENERATOR_H diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h index 6bad70059f7..c3a754a639d 100644 --- a/core/math/random_pcg.h +++ b/core/math/random_pcg.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RANDOM_PCG_H -#define RANDOM_PCG_H +#pragma once #include "core/math/math_defs.h" @@ -149,5 +148,3 @@ public: float random(float p_from, float p_to); int random(int p_from, int p_to); }; - -#endif // RANDOM_PCG_H diff --git a/core/math/rect2.h b/core/math/rect2.h index 817923c1348..55b468d8a08 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RECT2_H -#define RECT2_H +#pragma once #include "core/error/error_macros.h" #include "core/math/vector2.h" @@ -371,5 +370,3 @@ struct [[nodiscard]] Rect2 { size(p_size) { } }; - -#endif // RECT2_H diff --git a/core/math/rect2i.h b/core/math/rect2i.h index 5f3a3d54f5d..56a5cfec2f0 100644 --- a/core/math/rect2i.h +++ b/core/math/rect2i.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RECT2I_H -#define RECT2I_H +#pragma once #include "core/error/error_macros.h" #include "core/math/vector2i.h" @@ -237,5 +236,3 @@ struct [[nodiscard]] Rect2i { size(p_size) { } }; - -#endif // RECT2I_H diff --git a/core/math/static_raycaster.h b/core/math/static_raycaster.h index 74e4b75163b..9a9fc6a6aa2 100644 --- a/core/math/static_raycaster.h +++ b/core/math/static_raycaster.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef STATIC_RAYCASTER_H -#define STATIC_RAYCASTER_H +#pragma once #include "core/object/ref_counted.h" @@ -107,5 +106,3 @@ public: static Ref create(); }; - -#endif // STATIC_RAYCASTER_H diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h index 1ee7d3d84f7..eda4379c34f 100644 --- a/core/math/transform_2d.h +++ b/core/math/transform_2d.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TRANSFORM_2D_H -#define TRANSFORM_2D_H +#pragma once #include "core/math/math_funcs.h" #include "core/math/rect2.h" @@ -249,5 +248,3 @@ Vector Transform2D::xform_inv(const Vector &p_array) const { } return array; } - -#endif // TRANSFORM_2D_H diff --git a/core/math/transform_3d.h b/core/math/transform_3d.h index b1de233445e..12fddfbed3f 100644 --- a/core/math/transform_3d.h +++ b/core/math/transform_3d.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TRANSFORM_3D_H -#define TRANSFORM_3D_H +#pragma once #include "core/math/aabb.h" #include "core/math/basis.h" @@ -269,5 +268,3 @@ _FORCE_INLINE_ Plane Transform3D::xform_inv_fast(const Plane &p_plane, const Tra real_t d = normal.dot(point); return Plane(normal, d); } - -#endif // TRANSFORM_3D_H diff --git a/core/math/transform_interpolator.h b/core/math/transform_interpolator.h index cc556707e4c..d80876d9d3f 100644 --- a/core/math/transform_interpolator.h +++ b/core/math/transform_interpolator.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TRANSFORM_INTERPOLATOR_H -#define TRANSFORM_INTERPOLATOR_H +#pragma once #include "core/math/math_defs.h" #include "core/math/vector3.h" @@ -91,5 +90,3 @@ public: static Method find_method(const Basis &p_a, const Basis &p_b); }; - -#endif // TRANSFORM_INTERPOLATOR_H diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h index 24fc12dda92..28f792b4dd4 100644 --- a/core/math/triangle_mesh.h +++ b/core/math/triangle_mesh.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TRIANGLE_MESH_H -#define TRIANGLE_MESH_H +#pragma once #include "core/math/face3.h" #include "core/object/ref_counted.h" @@ -94,5 +93,3 @@ public: void create(const Vector &p_faces, const Vector &p_surface_indices = Vector()); TriangleMesh(); }; - -#endif // TRIANGLE_MESH_H diff --git a/core/math/triangulate.h b/core/math/triangulate.h index 0b88f7ec4cb..87cdbd4f9cf 100644 --- a/core/math/triangulate.h +++ b/core/math/triangulate.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TRIANGULATE_H -#define TRIANGULATE_H +#pragma once #include "core/math/vector2.h" #include "core/templates/vector.h" @@ -58,5 +57,3 @@ public: private: static bool snip(const Vector &p_contour, int u, int v, int w, int n, const Vector &V, bool relaxed); }; - -#endif // TRIANGULATE_H diff --git a/core/math/vector2.h b/core/math/vector2.h index edb47db6fd3..6f74ed72087 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef VECTOR2_H -#define VECTOR2_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_funcs.h" @@ -326,5 +325,3 @@ _FORCE_INLINE_ Vector2 operator*(int64_t p_scalar, const Vector2 &p_vec) { typedef Vector2 Size2; typedef Vector2 Point2; - -#endif // VECTOR2_H diff --git a/core/math/vector2i.h b/core/math/vector2i.h index fff9b0a658f..f4a3582e5ab 100644 --- a/core/math/vector2i.h +++ b/core/math/vector2i.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef VECTOR2I_H -#define VECTOR2I_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_funcs.h" @@ -169,5 +168,3 @@ _FORCE_INLINE_ Vector2i operator*(double p_scalar, const Vector2i &p_vector) { typedef Vector2i Size2i; typedef Vector2i Point2i; - -#endif // VECTOR2I_H diff --git a/core/math/vector3.h b/core/math/vector3.h index fd0dec3550d..e219d102dca 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef VECTOR3_H -#define VECTOR3_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_funcs.h" @@ -549,5 +548,3 @@ Vector3 Vector3::reflect(const Vector3 &p_normal) const { #endif return 2.0f * p_normal * dot(p_normal) - *this; } - -#endif // VECTOR3_H diff --git a/core/math/vector3i.h b/core/math/vector3i.h index 40d0700bf73..6866d4f3d83 100644 --- a/core/math/vector3i.h +++ b/core/math/vector3i.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef VECTOR3I_H -#define VECTOR3I_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_funcs.h" @@ -335,5 +334,3 @@ bool Vector3i::operator>=(const Vector3i &p_v) const { void Vector3i::zero() { x = y = z = 0; } - -#endif // VECTOR3I_H diff --git a/core/math/vector4.h b/core/math/vector4.h index 9197e3587ab..fdfea98af4a 100644 --- a/core/math/vector4.h +++ b/core/math/vector4.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef VECTOR4_H -#define VECTOR4_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_defs.h" @@ -302,5 +301,3 @@ _FORCE_INLINE_ Vector4 operator*(int32_t p_scalar, const Vector4 &p_vec) { _FORCE_INLINE_ Vector4 operator*(int64_t p_scalar, const Vector4 &p_vec) { return p_vec * p_scalar; } - -#endif // VECTOR4_H diff --git a/core/math/vector4i.h b/core/math/vector4i.h index a9036d684ab..84504897ebe 100644 --- a/core/math/vector4i.h +++ b/core/math/vector4i.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef VECTOR4I_H -#define VECTOR4I_H +#pragma once #include "core/error/error_macros.h" #include "core/math/math_funcs.h" @@ -363,5 +362,3 @@ bool Vector4i::operator>=(const Vector4i &p_v) const { void Vector4i::zero() { x = y = z = w = 0; } - -#endif // VECTOR4I_H diff --git a/core/object/callable_method_pointer.h b/core/object/callable_method_pointer.h index a12db51cbb0..ea2353f5671 100644 --- a/core/object/callable_method_pointer.h +++ b/core/object/callable_method_pointer.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef CALLABLE_METHOD_POINTER_H -#define CALLABLE_METHOD_POINTER_H +#pragma once #include "core/object/object.h" #include "core/variant/binder_common.h" @@ -292,5 +291,3 @@ Callable create_custom_callable_static_function_pointer( #else #define callable_mp_static(M) create_custom_callable_static_function_pointer(M) #endif - -#endif // CALLABLE_METHOD_POINTER_H diff --git a/core/object/class_db.h b/core/object/class_db.h index ed9550cc2f8..27c6d689ced 100644 --- a/core/object/class_db.h +++ b/core/object/class_db.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef CLASS_DB_H -#define CLASS_DB_H +#pragma once #include "core/object/method_bind.h" #include "core/object/object.h" @@ -565,5 +564,3 @@ _FORCE_INLINE_ Vector errarray(P... p_args) { #define GDREGISTER_NATIVE_STRUCT(m_class, m_code) ClassDB::register_native_struct(#m_class, m_code, sizeof(m_class)) #include "core/disabled_classes.gen.h" - -#endif // CLASS_DB_H diff --git a/core/object/message_queue.h b/core/object/message_queue.h index 64e244bda8b..8a66d0c1828 100644 --- a/core/object/message_queue.h +++ b/core/object/message_queue.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef MESSAGE_QUEUE_H -#define MESSAGE_QUEUE_H +#pragma once #include "core/object/object_id.h" #include "core/os/thread_safe.h" @@ -171,5 +170,3 @@ public: MessageQueue(); ~MessageQueue(); }; - -#endif // MESSAGE_QUEUE_H diff --git a/core/object/method_bind.h b/core/object/method_bind.h index a07824a0dca..af96d2b3c94 100644 --- a/core/object/method_bind.h +++ b/core/object/method_bind.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef METHOD_BIND_H -#define METHOD_BIND_H +#pragma once #include "core/variant/binder_common.h" @@ -790,5 +789,3 @@ MethodBind *create_static_method_bind(R (*p_method)(P...)) { MethodBind *a = memnew((MethodBindTRS)(p_method)); return a; } - -#endif // METHOD_BIND_H diff --git a/core/object/object.h b/core/object/object.h index c66f24d05d1..686304625be 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef OBJECT_H -#define OBJECT_H +#pragma once #include "core/extension/gdextension_interface.h" #include "core/object/message_queue.h" @@ -1065,5 +1064,3 @@ public: static void debug_objects(DebugFunc p_func); static int get_object_count(); }; - -#endif // OBJECT_H diff --git a/core/object/object_id.h b/core/object/object_id.h index b04e2df128c..76aec0f7290 100644 --- a/core/object/object_id.h +++ b/core/object/object_id.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef OBJECT_ID_H -#define OBJECT_ID_H +#pragma once #include "core/typedefs.h" @@ -59,5 +58,3 @@ public: _ALWAYS_INLINE_ explicit ObjectID(const uint64_t p_id) { id = p_id; } _ALWAYS_INLINE_ explicit ObjectID(const int64_t p_id) { id = p_id; } }; - -#endif // OBJECT_ID_H diff --git a/core/object/ref_counted.h b/core/object/ref_counted.h index 927e457de2c..be1633622ce 100644 --- a/core/object/ref_counted.h +++ b/core/object/ref_counted.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef REF_COUNTED_H -#define REF_COUNTED_H +#pragma once #include "core/object/class_db.h" #include "core/templates/safe_refcount.h" @@ -277,5 +276,3 @@ struct VariantInternalAccessor &> { static _FORCE_INLINE_ Ref get(const Variant *v) { return Ref(*VariantInternal::get_object(v)); } static _FORCE_INLINE_ void set(Variant *v, const Ref &p_ref) { VariantInternal::object_assign(v, p_ref); } }; - -#endif // REF_COUNTED_H diff --git a/core/object/script_instance.h b/core/object/script_instance.h index 2c8132ec1f1..59b7199cb6b 100644 --- a/core/object/script_instance.h +++ b/core/object/script_instance.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef SCRIPT_INSTANCE_H -#define SCRIPT_INSTANCE_H +#pragma once #include "core/object/ref_counted.h" @@ -96,5 +95,3 @@ public: virtual ScriptLanguage *get_language() = 0; virtual ~ScriptInstance(); }; - -#endif // SCRIPT_INSTANCE_H diff --git a/core/object/script_language.h b/core/object/script_language.h index 8158d633ae1..7d439da6cac 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -28,8 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef SCRIPT_LANGUAGE_H -#define SCRIPT_LANGUAGE_H +#pragma once #include "core/doc_data.h" #include "core/io/resource.h" @@ -505,5 +504,3 @@ public: PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref