Skip to content

Commit a729c86

Browse files
committed
Remove type_trait.inl infavor of using enums for constants.
1 parent 91098d2 commit a729c86

File tree

2 files changed

+34
-86
lines changed

2 files changed

+34
-86
lines changed

glm/gtx/type_trait.hpp

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,53 +31,62 @@ namespace glm
3131
template<typename T>
3232
struct type
3333
{
34-
static bool const is_vec = false;
35-
static bool const is_mat = false;
36-
static bool const is_quat = false;
37-
static length_t const components = 0;
38-
static length_t const cols = 0;
39-
static length_t const rows = 0;
34+
enum {
35+
is_vec = false,
36+
is_mat = false,
37+
is_quat = false,
38+
components = 0,
39+
cols = 0,
40+
rows = 0
41+
};
4042
};
4143

4244
template<length_t L, typename T, qualifier Q>
4345
struct type<vec<L, T, Q> >
4446
{
45-
static bool const is_vec = true;
46-
static bool const is_mat = false;
47-
static bool const is_quat = false;
48-
static length_t const components = L;
47+
enum {
48+
is_vec = true,
49+
is_mat = false,
50+
is_quat = false,
51+
components = L
52+
};
4953
};
5054

5155
template<length_t C, length_t R, typename T, qualifier Q>
5256
struct type<mat<C, R, T, Q> >
5357
{
54-
static bool const is_vec = false;
55-
static bool const is_mat = true;
56-
static bool const is_quat = false;
57-
static length_t const components = C;
58-
static length_t const cols = C;
59-
static length_t const rows = R;
58+
enum {
59+
is_vec = false,
60+
is_mat = true,
61+
is_quat = false,
62+
components = C,
63+
cols = C,
64+
rows = R
65+
};
6066
};
6167

6268
template<typename T, qualifier Q>
6369
struct type<qua<T, Q> >
6470
{
65-
static bool const is_vec = false;
66-
static bool const is_mat = false;
67-
static bool const is_quat = true;
68-
static length_t const components = 4;
71+
enum {
72+
is_vec = false,
73+
is_mat = false,
74+
is_quat = true,
75+
components = 4
76+
};
6977
};
7078

7179
template<typename T, qualifier Q>
7280
struct type<tdualquat<T, Q> >
7381
{
74-
static bool const is_vec = false;
75-
static bool const is_mat = false;
76-
static bool const is_quat = true;
77-
static length_t const components = 8;
82+
enum {
83+
is_vec = false,
84+
is_mat = false,
85+
is_quat = true,
86+
components = 8
87+
};
7888
};
7989

8090
/// @}
8191
}//namespace glm
8292

83-
#include "type_trait.inl"

glm/gtx/type_trait.inl

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)