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 EDITOR_IMPORT_BLEND_RUNNER_H
#define EDITOR_IMPORT_BLEND_RUNNER_H
#pragma once
#ifdef TOOLS_ENABLED
@ -68,5 +67,3 @@ public:
};
#endif // TOOLS_ENABLED
#endif // EDITOR_IMPORT_BLEND_RUNNER_H

View file

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

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef EDITOR_SCENE_EXPORTER_GLTF_SETTINGS_H
#define EDITOR_SCENE_EXPORTER_GLTF_SETTINGS_H
#pragma once
#ifdef TOOLS_ENABLED
@ -65,5 +64,3 @@ public:
};
#endif // TOOLS_ENABLED
#endif // EDITOR_SCENE_EXPORTER_GLTF_SETTINGS_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef EDITOR_SCENE_IMPORTER_BLEND_H
#define EDITOR_SCENE_IMPORTER_BLEND_H
#pragma once
#ifdef TOOLS_ENABLED
@ -113,5 +112,3 @@ public:
};
#endif // TOOLS_ENABLED
#endif // EDITOR_SCENE_IMPORTER_BLEND_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef EDITOR_SCENE_IMPORTER_GLTF_H
#define EDITOR_SCENE_IMPORTER_GLTF_H
#pragma once
#ifdef TOOLS_ENABLED
@ -54,5 +53,3 @@ public:
};
#endif // TOOLS_ENABLED
#endif // EDITOR_SCENE_IMPORTER_GLTF_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DOCUMENT_EXTENSION_H
#define GLTF_DOCUMENT_EXTENSION_H
#pragma once
#include "../gltf_state.h"
@ -94,5 +93,3 @@ public:
GDVIRTUAL4R(Error, _export_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
GDVIRTUAL1R(Error, _export_post, Ref<GLTFState>);
};
#endif // GLTF_DOCUMENT_EXTENSION_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DOCUMENT_EXTENSION_CONVERT_IMPORTER_MESH_H
#define GLTF_DOCUMENT_EXTENSION_CONVERT_IMPORTER_MESH_H
#pragma once
#include "gltf_document_extension.h"
@ -45,5 +44,3 @@ public:
static MeshInstance3D *convert_importer_mesh_instance_3d(ImporterMeshInstance3D *p_importer_mesh_instance_3d);
Error import_post(Ref<GLTFState> p_state, Node *p_root) override;
};
#endif // GLTF_DOCUMENT_EXTENSION_CONVERT_IMPORTER_MESH_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DOCUMENT_EXTENSION_TEXTURE_KTX_H
#define GLTF_DOCUMENT_EXTENSION_TEXTURE_KTX_H
#pragma once
#include "gltf_document_extension.h"
@ -43,5 +42,3 @@ public:
Error parse_image_data(Ref<GLTFState> p_state, const PackedByteArray &p_image_data, const String &p_mime_type, Ref<Image> r_image) override;
Error parse_texture_json(Ref<GLTFState> p_state, const Dictionary &p_texture_json, Ref<GLTFTexture> r_gltf_texture) override;
};
#endif // GLTF_DOCUMENT_EXTENSION_TEXTURE_KTX_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DOCUMENT_EXTENSION_TEXTURE_WEBP_H
#define GLTF_DOCUMENT_EXTENSION_TEXTURE_WEBP_H
#pragma once
#include "gltf_document_extension.h"
@ -49,5 +48,3 @@ public:
Error save_image_at_path(Ref<GLTFState> p_state, Ref<Image> p_image, const String &p_full_path, const String &p_image_format, float p_lossy_quality) override;
Error serialize_texture_json(Ref<GLTFState> p_state, Dictionary p_texture_json, Ref<GLTFTexture> p_gltf_texture, const String &p_image_format) override;
};
#endif // GLTF_DOCUMENT_EXTENSION_TEXTURE_WEBP_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_LIGHT_H
#define GLTF_LIGHT_H
#pragma once
#include "core/io/resource.h"
@ -84,5 +83,3 @@ public:
Variant get_additional_data(const StringName &p_extension_name);
void set_additional_data(const StringName &p_extension_name, Variant p_additional_data);
};
#endif // GLTF_LIGHT_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_SPEC_GLOSS_H
#define GLTF_SPEC_GLOSS_H
#pragma once
#include "core/io/resource.h"
@ -70,5 +69,3 @@ public:
Ref<Image> get_spec_gloss_img();
void set_spec_gloss_img(Ref<Image> p_spec_gloss_img);
};
#endif // GLTF_SPEC_GLOSS_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DOCUMENT_EXTENSION_PHYSICS_H
#define GLTF_DOCUMENT_EXTENSION_PHYSICS_H
#pragma once
#include "../gltf_document_extension.h"
#include "gltf_physics_body.h"
@ -51,5 +50,3 @@ public:
Ref<GLTFObjectModelProperty> export_object_model_property(Ref<GLTFState> p_state, const NodePath &p_node_path, const Node *p_godot_node, GLTFNodeIndex p_gltf_node_index, const Object *p_target_object, int p_target_depth) override;
Error export_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &r_node_json, Node *p_scene_node) override;
};
#endif // GLTF_DOCUMENT_EXTENSION_PHYSICS_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_PHYSICS_BODY_H
#define GLTF_PHYSICS_BODY_H
#pragma once
#include "scene/3d/physics/physics_body_3d.h"
@ -103,5 +102,3 @@ public:
static Ref<GLTFPhysicsBody> from_dictionary(const Dictionary p_dictionary);
Dictionary to_dictionary() const;
};
#endif // GLTF_PHYSICS_BODY_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_PHYSICS_SHAPE_H
#define GLTF_PHYSICS_SHAPE_H
#pragma once
#include "../../gltf_defines.h"
@ -89,5 +88,3 @@ public:
static Ref<GLTFPhysicsShape> from_dictionary(const Dictionary p_dictionary);
Dictionary to_dictionary() const;
};
#endif // GLTF_PHYSICS_SHAPE_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DEFINES_H
#define GLTF_DEFINES_H
#pragma once
// This file should only be included by other headers.
@ -66,5 +65,3 @@ using GLTFSkeletonIndex = int;
using GLTFSkinIndex = int;
using GLTFTextureIndex = int;
using GLTFTextureSamplerIndex = int;
#endif // GLTF_DEFINES_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_DOCUMENT_H
#define GLTF_DOCUMENT_H
#pragma once
#include "extensions/gltf_document_extension.h"
#include "extensions/gltf_spec_gloss.h"
@ -388,5 +387,3 @@ public:
};
VARIANT_ENUM_CAST(GLTFDocument::RootNodeMode);
#endif // GLTF_DOCUMENT_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_STATE_H
#define GLTF_STATE_H
#pragma once
#include "extensions/gltf_light.h"
#include "structures/gltf_accessor.h"
@ -252,5 +251,3 @@ public:
Variant get_additional_data(const StringName &p_extension_name);
void set_additional_data(const StringName &p_extension_name, Variant p_additional_data);
};
#endif // GLTF_STATE_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_TEMPLATE_CONVERT_H
#define GLTF_TEMPLATE_CONVERT_H
#pragma once
#include "core/templates/hash_set.h"
#include "core/variant/array.h"
@ -91,5 +90,3 @@ static void set_from_dictionary(HashMap<K, V> &r_out, const Dictionary &p_inp) {
}
}
} //namespace GLTFTemplateConvert
#endif // GLTF_TEMPLATE_CONVERT_H

View file

@ -28,12 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_REGISTER_TYPES_H
#define GLTF_REGISTER_TYPES_H
#pragma once
#include "modules/register_module_types.h"
void initialize_gltf_module(ModuleInitializationLevel p_level);
void uninitialize_gltf_module(ModuleInitializationLevel p_level);
#endif // GLTF_REGISTER_TYPES_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef SKIN_TOOL_H
#define SKIN_TOOL_H
#pragma once
#include "gltf_defines.h"
@ -95,5 +94,3 @@ public:
HashMap<GLTFNodeIndex, Node *> &r_scene_nodes);
static Error _create_skins(Vector<Ref<GLTFSkin>> &skins, Vector<Ref<GLTFNode>> &nodes, bool use_named_skin_binds, HashSet<String> &unique_names);
};
#endif // SKIN_TOOL_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_ACCESSOR_H
#define GLTF_ACCESSOR_H
#pragma once
#include "../gltf_defines.h"
@ -133,5 +132,3 @@ public:
VARIANT_ENUM_CAST(GLTFAccessor::GLTFAccessorType);
VARIANT_ENUM_CAST(GLTFAccessor::GLTFComponentType);
#endif // GLTF_ACCESSOR_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_ANIMATION_H
#define GLTF_ANIMATION_H
#pragma once
#include "scene/resources/animation.h"
@ -86,5 +85,3 @@ public:
GLTFAnimation();
};
#endif // GLTF_ANIMATION_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_BUFFER_VIEW_H
#define GLTF_BUFFER_VIEW_H
#pragma once
#include "../gltf_defines.h"
@ -80,5 +79,3 @@ public:
Vector<uint8_t> load_buffer_view_data(const Ref<GLTFState> p_state) const;
};
#endif // GLTF_BUFFER_VIEW_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_CAMERA_H
#define GLTF_CAMERA_H
#pragma once
#include "core/io/resource.h"
@ -74,5 +73,3 @@ public:
static Ref<GLTFCamera> from_dictionary(const Dictionary p_dictionary);
virtual Dictionary to_dictionary() const;
};
#endif // GLTF_CAMERA_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_MESH_H
#define GLTF_MESH_H
#pragma once
#include "../gltf_defines.h"
@ -60,5 +59,3 @@ public:
Variant get_additional_data(const StringName &p_extension_name);
void set_additional_data(const StringName &p_extension_name, Variant p_additional_data);
};
#endif // GLTF_MESH_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_NODE_H
#define GLTF_NODE_H
#pragma once
#include "../gltf_defines.h"
@ -108,5 +107,3 @@ public:
NodePath get_scene_node_path(Ref<GLTFState> p_state, bool p_handle_skeletons = true);
};
#endif // GLTF_NODE_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_OBJECT_MODEL_PROPERTY_H
#define GLTF_OBJECT_MODEL_PROPERTY_H
#pragma once
#include "core/math/expression.h"
#include "core/variant/typed_array.h"
@ -100,5 +99,3 @@ public:
};
VARIANT_ENUM_CAST(GLTFObjectModelProperty::GLTFObjectModelType);
#endif // GLTF_OBJECT_MODEL_PROPERTY_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_SKELETON_H
#define GLTF_SKELETON_H
#pragma once
#include "../gltf_defines.h"
@ -103,5 +102,3 @@ public:
int32_t get_bone_attachment_count();
};
#endif // GLTF_SKELETON_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_SKIN_H
#define GLTF_SKIN_H
#pragma once
#include "../gltf_defines.h"
@ -116,5 +115,3 @@ public:
Dictionary to_dictionary();
Error from_dictionary(const Dictionary &dict);
};
#endif // GLTF_SKIN_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_TEXTURE_H
#define GLTF_TEXTURE_H
#pragma once
#include "../gltf_defines.h"
@ -51,5 +50,3 @@ public:
GLTFTextureSamplerIndex get_sampler() const;
void set_sampler(GLTFTextureSamplerIndex val);
};
#endif // GLTF_TEXTURE_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GLTF_TEXTURE_SAMPLER_H
#define GLTF_TEXTURE_SAMPLER_H
#pragma once
#include "scene/resources/material.h"
@ -158,5 +157,3 @@ private:
VARIANT_ENUM_CAST(GLTFTextureSampler::FilterMode);
VARIANT_ENUM_CAST(GLTFTextureSampler::WrapMode);
#endif // GLTF_TEXTURE_SAMPLER_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_GLTF_H
#define TEST_GLTF_H
#pragma once
#include "tests/test_macros.h"
@ -162,5 +161,3 @@ void init(const String &p_test, const String &p_copy_target = String()) {
} //namespace TestGltf
#endif // TOOLS_ENABLED
#endif // TEST_GLTF_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_GLTF_EXTRAS_H
#define TEST_GLTF_EXTRAS_H
#pragma once
#include "test_gltf.h"
#include "tests/test_macros.h"
@ -174,5 +173,3 @@ TEST_CASE("[SceneTree][Node] GLTF test skeleton and bone export and import") {
} //namespace TestGltf
#endif // TOOLS_ENABLED
#endif // TEST_GLTF_EXTRAS_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_GLTF_IMAGES_H
#define TEST_GLTF_IMAGES_H
#pragma once
#include "test_gltf.h"
@ -165,5 +164,3 @@ TEST_CASE("[SceneTree][Node][Editor] Import GLTF with embedded texture, check ho
} //namespace TestGltf
#endif // TOOLS_ENABLED
#endif // TEST_GLTF_IMAGES_H