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 TEST_AABB_H
#define TEST_AABB_H
#pragma once
#include "core/math/aabb.h"
@@ -481,5 +480,3 @@ TEST_CASE("[AABB] Finite number checks") {
}
} // namespace TestAABB
#endif // TEST_AABB_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_ASTAR_H
#define TEST_ASTAR_H
#pragma once
#include "core/math/a_star.h"
@@ -358,5 +357,3 @@ TEST_CASE("[Stress][AStar3D] Find paths") {
}
}
} // namespace TestAStar
#endif // TEST_ASTAR_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_BASIS_H
#define TEST_BASIS_H
#pragma once
#include "core/math/basis.h"
#include "core/math/random_number_generator.h"
@@ -427,5 +426,3 @@ TEST_CASE("[Basis] Is rotation checks") {
}
} // namespace TestBasis
#endif // TEST_BASIS_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_COLOR_H
#define TEST_COLOR_H
#pragma once
#include "core/math/color.h"
@@ -227,5 +226,3 @@ TEST_CASE("[Color] Manipulation methods") {
"Red interpolated with yellow should be orange (with interpolated alpha).");
}
} // namespace TestColor
#endif // TEST_COLOR_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_EXPRESSION_H
#define TEST_EXPRESSION_H
#pragma once
#include "core/math/expression.h"
@@ -505,5 +504,3 @@ TEST_CASE("[Expression] Unusual expressions") {
// "`(-9223372036854775807 - 1) / -1` should return the expected result.");
}
} // namespace TestExpression
#endif // TEST_EXPRESSION_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_GEOMETRY_2D_H
#define TEST_GEOMETRY_2D_H
#pragma once
#include "core/math/geometry_2d.h"
@@ -888,5 +887,3 @@ TEST_CASE("[Geometry2D] Bresenham line") {
}
}
} // namespace TestGeometry2D
#endif // TEST_GEOMETRY_2D_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_GEOMETRY_3D_H
#define TEST_GEOMETRY_3D_H
#pragma once
#include "core/math/geometry_3d.h"
#include "tests/test_macros.h"
@@ -200,5 +199,3 @@ TEST_CASE("[Geometry3D] Triangle and Sphere Intersect") {
CHECK(Geometry3D::triangle_sphere_intersection_test(&triangle[0], Vector3(0, 1, 0), Vector3(20, 0, 0), 5, triangle_contact, sphere_contact) == false);
}
} // namespace TestGeometry3D
#endif // TEST_GEOMETRY_3D_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_MATH_FUNCS_H
#define TEST_MATH_FUNCS_H
#pragma once
#include "tests/test_macros.h"
@@ -640,5 +639,3 @@ TEST_CASE_TEMPLATE("[Math] bezier_interpolate", T, float, double) {
}
} // namespace TestMath
#endif // TEST_MATH_FUNCS_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_PLANE_H
#define TEST_PLANE_H
#pragma once
#include "core/math/plane.h"
@@ -191,5 +190,3 @@ TEST_CASE("[Plane] Finite number checks") {
}
} // namespace TestPlane
#endif // TEST_PLANE_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_PROJECTION_H
#define TEST_PROJECTION_H
#pragma once
#include "core/math/aabb.h"
#include "core/math/plane.h"
@@ -699,5 +698,3 @@ TEST_CASE("[Projection] Pixels per meter") {
CHECK(ppm == 400);
}
} //namespace TestProjection
#endif // TEST_PROJECTION_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_QUATERNION_H
#define TEST_QUATERNION_H
#pragma once
#include "core/math/math_defs.h"
#include "core/math/math_funcs.h"
@@ -492,5 +491,3 @@ TEST_CASE("[Quaternion] Finite number checks") {
}
} // namespace TestQuaternion
#endif // TEST_QUATERNION_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_RANDOM_NUMBER_GENERATOR_H
#define TEST_RANDOM_NUMBER_GENERATOR_H
#pragma once
#include "core/math/random_number_generator.h"
#include "tests/test_macros.h"
@@ -271,5 +270,3 @@ TEST_CASE_MAY_FAIL("[RandomNumberGenerator] randi_range bias check") {
}
}
} // namespace TestRandomNumberGenerator
#endif // TEST_RANDOM_NUMBER_GENERATOR_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_RECT2_H
#define TEST_RECT2_H
#pragma once
#include "core/math/rect2.h"
#include "core/math/rect2i.h"
@@ -344,5 +343,3 @@ TEST_CASE("[Rect2] Finite number checks") {
}
} // namespace TestRect2
#endif // TEST_RECT2_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_RECT2I_H
#define TEST_RECT2I_H
#pragma once
#include "core/math/rect2.h"
#include "core/math/rect2i.h"
@@ -307,5 +306,3 @@ TEST_CASE("[Rect2i] Merging") {
"merge() with non-enclosed Rect2i should return the expected result.");
}
} // namespace TestRect2i
#endif // TEST_RECT2I_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_TRANSFORM_2D_H
#define TEST_TRANSFORM_2D_H
#pragma once
#include "core/math/transform_2d.h"
@@ -245,5 +244,3 @@ TEST_CASE("[Transform2D] Is conformal checks") {
}
} // namespace TestTransform2D
#endif // TEST_TRANSFORM_2D_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_TRANSFORM_3D_H
#define TEST_TRANSFORM_3D_H
#pragma once
#include "core/math/transform_3d.h"
@@ -137,5 +136,3 @@ TEST_CASE("[Transform3D] Rotate in-place (local rotation)") {
CHECK_MESSAGE(rotated_transform.is_equal_approx(expected), "The rotated transform should have a new orientation but still be based on the same origin.");
}
} // namespace TestTransform3D
#endif // TEST_TRANSFORM_3D_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_VECTOR2_H
#define TEST_VECTOR2_H
#pragma once
#include "core/math/vector2.h"
#include "core/math/vector2i.h"
@@ -498,5 +497,3 @@ TEST_CASE("[Vector2] Finite number checks") {
}
} // namespace TestVector2
#endif // TEST_VECTOR2_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_VECTOR2I_H
#define TEST_VECTOR2I_H
#pragma once
#include "core/math/vector2.h"
#include "core/math/vector2i.h"
@@ -167,5 +166,3 @@ TEST_CASE("[Vector2i] Abs and sign methods") {
"Vector2i sign should work as expected.");
}
} // namespace TestVector2i
#endif // TEST_VECTOR2I_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_VECTOR3_H
#define TEST_VECTOR3_H
#pragma once
#include "core/math/vector3.h"
#include "tests/test_macros.h"
@@ -535,5 +534,3 @@ TEST_CASE("[Vector3] Finite number checks") {
}
} // namespace TestVector3
#endif // TEST_VECTOR3_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_VECTOR3I_H
#define TEST_VECTOR3I_H
#pragma once
#include "core/math/vector3i.h"
#include "tests/test_macros.h"
@@ -166,5 +165,3 @@ TEST_CASE("[Vector3i] Abs and sign methods") {
"Vector3i sign should work as expected.");
}
} // namespace TestVector3i
#endif // TEST_VECTOR3I_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_VECTOR4_H
#define TEST_VECTOR4_H
#pragma once
#include "core/math/vector4.h"
#include "tests/test_macros.h"
@@ -401,5 +400,3 @@ TEST_CASE("[Vector4] Finite number checks") {
}
} // namespace TestVector4
#endif // TEST_VECTOR4_H

View File

@@ -28,8 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef TEST_VECTOR4I_H
#define TEST_VECTOR4I_H
#pragma once
#include "core/math/vector4i.h"
#include "tests/test_macros.h"
@@ -170,5 +169,3 @@ TEST_CASE("[Vector4i] Abs and sign methods") {
"Vector4i sign should work as expected.");
}
} // namespace TestVector4i
#endif // TEST_VECTOR4I_H