Skip to content

Commit 611e486

Browse files
committed
A few more cases of constexpr
1 parent 73db2f1 commit 611e486

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Inc/DirectXCollision.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ namespace DirectX
8989
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
9090
// Test sphere against six planes (see BoundingFrustum::GetPlanes)
9191

92-
// Static methods
92+
// Static methods
9393
static void CreateMerged(_Out_ BoundingSphere& Out, _In_ const BoundingSphere& S1, _In_ const BoundingSphere& S2) noexcept;
9494

9595
static void CreateFromBoundingBox(_Out_ BoundingSphere& Out, _In_ const BoundingBox& box) noexcept;
@@ -106,7 +106,7 @@ namespace DirectX
106106
//-------------------------------------------------------------------------------------
107107
struct BoundingBox
108108
{
109-
static const size_t CORNER_COUNT = 8;
109+
static constexpr size_t CORNER_COUNT = 8;
110110

111111
XMFLOAT3 Center; // Center of the box.
112112
XMFLOAT3 Extents; // Distance from the center to each side.
@@ -155,7 +155,7 @@ namespace DirectX
155155
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
156156
// Test box against six planes (see BoundingFrustum::GetPlanes)
157157

158-
// Static methods
158+
// Static methods
159159
static void CreateMerged(_Out_ BoundingBox& Out, _In_ const BoundingBox& b1, _In_ const BoundingBox& b2) noexcept;
160160

161161
static void CreateFromSphere(_Out_ BoundingBox& Out, _In_ const BoundingSphere& sh) noexcept;
@@ -170,7 +170,7 @@ namespace DirectX
170170
//-------------------------------------------------------------------------------------
171171
struct BoundingOrientedBox
172172
{
173-
static const size_t CORNER_COUNT = 8;
173+
static constexpr size_t CORNER_COUNT = 8;
174174

175175
XMFLOAT3 Center; // Center of the box.
176176
XMFLOAT3 Extents; // Distance from the center to each side.
@@ -220,7 +220,7 @@ namespace DirectX
220220
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
221221
// Test OrientedBox against six planes (see BoundingFrustum::GetPlanes)
222222

223-
// Static methods
223+
// Static methods
224224
static void CreateFromBoundingBox(_Out_ BoundingOrientedBox& Out, _In_ const BoundingBox& box) noexcept;
225225

226226
static void CreateFromPoints(_Out_ BoundingOrientedBox& Out, _In_ size_t Count,
@@ -232,7 +232,7 @@ namespace DirectX
232232
//-------------------------------------------------------------------------------------
233233
struct BoundingFrustum
234234
{
235-
static const size_t CORNER_COUNT = 8;
235+
static constexpr size_t CORNER_COUNT = 8;
236236

237237
XMFLOAT3 Origin; // Origin of the frustum (and projection).
238238
XMFLOAT4 Orientation; // Quaternion representing rotation.
@@ -299,7 +299,7 @@ namespace DirectX
299299
_Out_opt_ XMVECTOR* LeftPlane, _Out_opt_ XMVECTOR* TopPlane, _Out_opt_ XMVECTOR* BottomPlane) const noexcept;
300300
// Create 6 Planes representation of Frustum
301301

302-
// Static methods
302+
// Static methods
303303
static void XM_CALLCONV CreateFromMatrix(_Out_ BoundingFrustum& Out, _In_ FXMMATRIX Projection, bool rhcoords = false) noexcept;
304304
};
305305

0 commit comments

Comments
 (0)