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
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 GODOT_AREA_2D_H
#define GODOT_AREA_2D_H
#pragma once
#include "godot_collision_object_2d.h"
@ -187,5 +186,3 @@ void GodotArea2D::remove_area_from_query(GodotArea2D *p_area, uint32_t p_area_sh
_queue_monitor_update();
}
}
#endif // GODOT_AREA_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_AREA_PAIR_2D_H
#define GODOT_AREA_PAIR_2D_H
#pragma once
#include "godot_area_2d.h"
#include "godot_body_2d.h"
@ -74,5 +73,3 @@ public:
GodotArea2Pair2D(GodotArea2D *p_area_a, int p_shape_a, GodotArea2D *p_area_b, int p_shape_b);
~GodotArea2Pair2D();
};
#endif // GODOT_AREA_PAIR_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BODY_2D_H
#define GODOT_BODY_2D_H
#pragma once
#include "godot_area_2d.h"
#include "godot_collision_object_2d.h"
@ -385,5 +384,3 @@ void GodotBody2D::add_contact(const Vector2 &p_local_pos, const Vector2 &p_local
c[idx].collider_velocity_at_pos = p_collider_velocity_at_pos;
c[idx].impulse = p_impulse;
}
#endif // GODOT_BODY_2D_H

View File

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

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BODY_PAIR_2D_H
#define GODOT_BODY_PAIR_2D_H
#pragma once
#include "godot_body_2d.h"
#include "godot_constraint_2d.h"
@ -97,5 +96,3 @@ public:
GodotBodyPair2D(GodotBody2D *p_A, int p_shape_A, GodotBody2D *p_B, int p_shape_B);
~GodotBodyPair2D();
};
#endif // GODOT_BODY_PAIR_2D_H

View File

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

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_BROAD_PHASE_2D_BVH_H
#define GODOT_BROAD_PHASE_2D_BVH_H
#pragma once
#include "godot_broad_phase_2d.h"
@ -97,5 +96,3 @@ public:
static GodotBroadPhase2D *_create();
GodotBroadPhase2DBVH();
};
#endif // GODOT_BROAD_PHASE_2D_BVH_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_COLLISION_OBJECT_2D_H
#define GODOT_COLLISION_OBJECT_2D_H
#pragma once
#include "godot_broad_phase_2d.h"
#include "godot_shape_2d.h"
@ -194,5 +193,3 @@ public:
virtual ~GodotCollisionObject2D() {}
};
#endif // GODOT_COLLISION_OBJECT_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_COLLISION_SOLVER_2D_H
#define GODOT_COLLISION_SOLVER_2D_H
#pragma once
#include "godot_shape_2d.h"
@ -46,5 +45,3 @@ private:
public:
static bool solve(const GodotShape2D *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const GodotShape2D *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, CallbackResult p_result_callback, void *p_userdata, Vector2 *r_sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
};
#endif // GODOT_COLLISION_SOLVER_2D_H

View File

@ -28,11 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_COLLISION_SOLVER_2D_SAT_H
#define GODOT_COLLISION_SOLVER_2D_SAT_H
#pragma once
#include "godot_collision_solver_2d.h"
bool sat_2d_calculate_penetration(const GodotShape2D *p_shape_A, const Transform2D &p_transform_A, const Vector2 &p_motion_A, const GodotShape2D *p_shape_B, const Transform2D &p_transform_B, const Vector2 &p_motion_B, GodotCollisionSolver2D::CallbackResult p_result_callback, void *p_userdata, bool p_swap = false, Vector2 *sep_axis = nullptr, real_t p_margin_A = 0, real_t p_margin_B = 0);
#endif // GODOT_COLLISION_SOLVER_2D_SAT_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_CONSTRAINT_2D_H
#define GODOT_CONSTRAINT_2D_H
#pragma once
#include "godot_body_2d.h"
@ -66,5 +65,3 @@ public:
virtual ~GodotConstraint2D() {}
};
#endif // GODOT_CONSTRAINT_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_JOINTS_2D_H
#define GODOT_JOINTS_2D_H
#pragma once
#include "godot_body_2d.h"
#include "godot_constraint_2d.h"
@ -188,5 +187,3 @@ public:
GodotDampedSpringJoint2D(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, GodotBody2D *p_body_a, GodotBody2D *p_body_b);
};
#endif // GODOT_JOINTS_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_PHYSICS_SERVER_2D_H
#define GODOT_PHYSICS_SERVER_2D_H
#pragma once
#include "godot_joints_2d.h"
#include "godot_shape_2d.h"
@ -303,5 +302,3 @@ public:
GodotPhysicsServer2D(bool p_using_threads = false);
~GodotPhysicsServer2D() {}
};
#endif // GODOT_PHYSICS_SERVER_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_SHAPE_2D_H
#define GODOT_SHAPE_2D_H
#pragma once
#include "servers/physics_server_2d.h"
@ -535,5 +534,3 @@ public:
};
#undef DEFAULT_PROJECT_RANGE_CAST
#endif // GODOT_SHAPE_2D_H

View File

@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef GODOT_SPACE_2D_H
#define GODOT_SPACE_2D_H
#pragma once
#include "godot_area_2d.h"
#include "godot_body_2d.h"
@ -206,5 +205,3 @@ public:
GodotSpace2D();
~GodotSpace2D();
};
#endif // GODOT_SPACE_2D_H

View File

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

View File

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