Style: Replace header guards with #pragma once

This commit is contained in:
Thaddeus Crews 2025-02-01 10:33:58 -06:00
parent 96fdaa616b
commit 324512e11c
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
1746 changed files with 1767 additions and 6920 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

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