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,13 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GJK_EPA_H
#define GJK_EPA_H
#pragma once
#include "godot_collision_solver_3d.h"
#include "godot_shape_3d.h"
bool gjk_epa_calculate_penetration(const GodotShape3D *p_shape_A, const Transform3D &p_transform_A, const GodotShape3D *p_shape_B, const Transform3D &p_transform_B, GodotCollisionSolver3D::CallbackResult p_result_callback, void *p_userdata, bool p_swap = false, real_t p_margin_A = 0.0, real_t p_margin_B = 0.0);
bool gjk_epa_calculate_distance(const GodotShape3D *p_shape_A, const Transform3D &p_transform_A, const GodotShape3D *p_shape_B, const Transform3D &p_transform_B, Vector3 &r_result_A, Vector3 &r_result_B);
#endif // GJK_EPA_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_AREA_3D_H
#define GODOT_AREA_3D_H
#pragma once
#include "godot_collision_object_3d.h"
@ -236,5 +235,3 @@ struct AreaCMP {
refCount = 1;
}
};
#endif // GODOT_AREA_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_AREA_PAIR_3D_H
#define GODOT_AREA_PAIR_3D_H
#pragma once
#include "godot_area_3d.h"
#include "godot_body_3d.h"
@ -94,5 +93,3 @@ public:
GodotAreaSoftBodyPair3D(GodotSoftBody3D *p_sof_body, int p_soft_body_shape, GodotArea3D *p_area, int p_area_shape);
~GodotAreaSoftBodyPair3D();
};
#endif // GODOT_AREA_PAIR_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BODY_3D_H
#define GODOT_BODY_3D_H
#pragma once
#include "godot_area_3d.h"
#include "godot_collision_object_3d.h"
@ -392,5 +391,3 @@ void GodotBody3D::add_contact(const Vector3 &p_local_pos, const Vector3 &p_local
c[idx].collider_velocity_at_pos = p_collider_velocity_at_pos;
c[idx].impulse = p_impulse;
}
#endif // GODOT_BODY_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BODY_DIRECT_STATE_3D_H
#define GODOT_BODY_DIRECT_STATE_3D_H
#pragma once
#include "servers/physics_server_3d.h"
@ -103,5 +102,3 @@ public:
virtual real_t get_step() const override;
};
#endif // GODOT_BODY_DIRECT_STATE_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BODY_PAIR_3D_H
#define GODOT_BODY_PAIR_3D_H
#pragma once
#include "godot_body_3d.h"
#include "godot_constraint_3d.h"
@ -143,5 +142,3 @@ public:
GodotBodySoftBodyPair3D(GodotBody3D *p_A, int p_shape_A, GodotSoftBody3D *p_B);
~GodotBodySoftBodyPair3D();
};
#endif // GODOT_BODY_PAIR_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BROAD_PHASE_3D_H
#define GODOT_BROAD_PHASE_3D_H
#pragma once
#include "core/math/aabb.h"
#include "core/math/math_funcs.h"
@ -68,5 +67,3 @@ public:
virtual ~GodotBroadPhase3D();
};
#endif // GODOT_BROAD_PHASE_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BROAD_PHASE_3D_BVH_H
#define GODOT_BROAD_PHASE_3D_BVH_H
#pragma once
#include "godot_broad_phase_3d.h"
@ -96,5 +95,3 @@ public:
static GodotBroadPhase3D *_create();
GodotBroadPhase3DBVH();
};
#endif // GODOT_BROAD_PHASE_3D_BVH_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_COLLISION_OBJECT_3D_H
#define GODOT_COLLISION_OBJECT_3D_H
#pragma once
#include "godot_broad_phase_3d.h"
#include "godot_shape_3d.h"
@ -190,5 +189,3 @@ public:
virtual ~GodotCollisionObject3D() {}
};
#endif // GODOT_COLLISION_OBJECT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_COLLISION_SOLVER_3D_H
#define GODOT_COLLISION_SOLVER_3D_H
#pragma once
#include "godot_shape_3d.h"
@ -53,5 +52,3 @@ public:
static bool solve_static(const GodotShape3D *p_shape_A, const Transform3D &p_transform_A, const GodotShape3D *p_shape_B, const Transform3D &p_transform_B, CallbackResult p_result_callback, void *p_userdata, Vector3 *r_sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
static bool solve_distance(const GodotShape3D *p_shape_A, const Transform3D &p_transform_A, const GodotShape3D *p_shape_B, const Transform3D &p_transform_B, Vector3 &r_point_A, Vector3 &r_point_B, const AABB &p_concave_hint, Vector3 *r_sep_axis = nullptr);
};
#endif // GODOT_COLLISION_SOLVER_3D_H

View file

@ -28,11 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_COLLISION_SOLVER_3D_SAT_H
#define GODOT_COLLISION_SOLVER_3D_SAT_H
#pragma once
#include "godot_collision_solver_3d.h"
bool sat_calculate_penetration(const GodotShape3D *p_shape_A, const Transform3D &p_transform_A, const GodotShape3D *p_shape_B, const Transform3D &p_transform_B, GodotCollisionSolver3D::CallbackResult p_result_callback, void *p_userdata, bool p_swap = false, Vector3 *r_prev_axis = nullptr, real_t p_margin_a = 0, real_t p_margin_b = 0);
#endif // GODOT_COLLISION_SOLVER_3D_SAT_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_CONSTRAINT_3D_H
#define GODOT_CONSTRAINT_3D_H
#pragma once
class GodotBody3D;
class GodotSoftBody3D;
@ -77,5 +76,3 @@ public:
virtual ~GodotConstraint3D() {}
};
#endif // GODOT_CONSTRAINT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_JOINT_3D_H
#define GODOT_JOINT_3D_H
#pragma once
#include "godot_body_3d.h"
#include "godot_constraint_3d.h"
@ -97,5 +96,3 @@ public:
}
}
};
#endif // GODOT_JOINT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_PHYSICS_SERVER_3D_H
#define GODOT_PHYSICS_SERVER_3D_H
#pragma once
#include "godot_joint_3d.h"
#include "godot_shape_3d.h"
@ -381,5 +380,3 @@ public:
GodotPhysicsServer3D(bool p_using_threads = false);
~GodotPhysicsServer3D() {}
};
#endif // GODOT_PHYSICS_SERVER_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_SHAPE_3D_H
#define GODOT_SHAPE_3D_H
#pragma once
#include "core/math/geometry_3d.h"
#include "core/templates/local_vector.h"
@ -510,5 +509,3 @@ struct GodotMotionShape3D : public GodotShape3D {
GodotMotionShape3D() { configure(AABB()); }
};
#endif // GODOT_SHAPE_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_SOFT_BODY_3D_H
#define GODOT_SOFT_BODY_3D_H
#pragma once
#include "godot_area_3d.h"
#include "godot_collision_object_3d.h"
@ -272,5 +271,3 @@ public:
GodotSoftBodyShape3D(GodotSoftBody3D *p_soft_body);
~GodotSoftBodyShape3D() {}
};
#endif // GODOT_SOFT_BODY_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_SPACE_3D_H
#define GODOT_SPACE_3D_H
#pragma once
#include "godot_area_3d.h"
#include "godot_body_3d.h"
@ -210,5 +209,3 @@ public:
GodotSpace3D();
~GodotSpace3D();
};
#endif // GODOT_SPACE_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_STEP_3D_H
#define GODOT_STEP_3D_H
#pragma once
#include "godot_space_3d.h"
@ -57,5 +56,3 @@ public:
GodotStep3D();
~GodotStep3D();
};
#endif // GODOT_STEP_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_CONE_TWIST_JOINT_3D_H
#define GODOT_CONE_TWIST_JOINT_3D_H
#pragma once
/*
Adapted to Godot from the Bullet library.
@ -138,5 +137,3 @@ public:
void set_param(PhysicsServer3D::ConeTwistJointParam p_param, real_t p_value);
real_t get_param(PhysicsServer3D::ConeTwistJointParam p_param) const;
};
#endif // GODOT_CONE_TWIST_JOINT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_GENERIC_6DOF_JOINT_3D_H
#define GODOT_GENERIC_6DOF_JOINT_3D_H
#pragma once
/*
Adapted to Godot from the Bullet library.
@ -318,5 +317,3 @@ public:
void set_flag(Vector3::Axis p_axis, PhysicsServer3D::G6DOFJointAxisFlag p_flag, bool p_value);
bool get_flag(Vector3::Axis p_axis, PhysicsServer3D::G6DOFJointAxisFlag p_flag) const;
};
#endif // GODOT_GENERIC_6DOF_JOINT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_HINGE_JOINT_3D_H
#define GODOT_HINGE_JOINT_3D_H
#pragma once
/*
Adapted to Godot from the Bullet library.
@ -112,5 +111,3 @@ public:
GodotHingeJoint3D(GodotBody3D *rbA, GodotBody3D *rbB, const Transform3D &frameA, const Transform3D &frameB);
GodotHingeJoint3D(GodotBody3D *rbA, GodotBody3D *rbB, const Vector3 &pivotInA, const Vector3 &pivotInB, const Vector3 &axisInA, const Vector3 &axisInB);
};
#endif // GODOT_HINGE_JOINT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_JACOBIAN_ENTRY_3D_H
#define GODOT_JACOBIAN_ENTRY_3D_H
#pragma once
/*
Adapted to Godot from the Bullet library.
@ -165,5 +164,3 @@ public:
//Optimization: can be stored in the w/last component of one of the vectors
real_t m_Adiag = 1.0;
};
#endif // GODOT_JACOBIAN_ENTRY_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_PIN_JOINT_3D_H
#define GODOT_PIN_JOINT_3D_H
#pragma once
/*
Adapted to Godot from the Bullet library.
@ -91,5 +90,3 @@ public:
GodotPinJoint3D(GodotBody3D *p_body_a, const Vector3 &p_pos_a, GodotBody3D *p_body_b, const Vector3 &p_pos_b);
~GodotPinJoint3D();
};
#endif // GODOT_PIN_JOINT_3D_H

View file

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_SLIDER_JOINT_3D_H
#define GODOT_SLIDER_JOINT_3D_H
#pragma once
/*
Adapted to Godot from the Bullet library.
@ -242,5 +241,3 @@ public:
virtual PhysicsServer3D::JointType get_type() const override { return PhysicsServer3D::JOINT_TYPE_SLIDER; }
};
#endif // GODOT_SLIDER_JOINT_3D_H

View file

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