Skip to content

Commit 2d8294e

Browse files
committed
xrRender: use C++11 alignas instead of ALIGN macro
1 parent 1077e04 commit 2d8294e

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/Layers/xrRender/R_Backend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ECORE_API CBackend
127127
u32 vb_stride;
128128

129129
// Pixel/Vertex constants
130-
ALIGN(16) R_constants constants;
130+
alignas(16) R_constants constants;
131131
R_constant_table* ctable;
132132

133133
// Shaders/State

src/Layers/xrRenderDX9/dx9r_constants_cache.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
template <class T, u32 limit>
66
class R_constant_cache
77
{
8-
private:
9-
ALIGN(16) svector<T, limit> array;
8+
alignas(16) svector<T, limit> array;
109
u32 lo, hi;
1110

1211
public:
@@ -35,13 +34,11 @@ class R_constant_array
3534
typedef R_constant_cache<Ivector4, 16> t_i;
3635
typedef R_constant_cache<BOOL, 16> t_b;
3736

38-
public:
39-
ALIGN(16) t_f c_f;
37+
alignas(16) t_f c_f;
4038
// ALIGN(16) t_i c_i;
4139
// ALIGN(16) t_b c_b;
4240
BOOL b_dirty;
4341

44-
public:
4542
t_f& get_array_f() { return c_f; }
4643
// t_i& get_array_i () { return c_i; }
4744
// t_b& get_array_b () { return c_b; }
@@ -140,12 +137,11 @@ class R_constant_array
140137
class ECORE_API R_constants
141138
{
142139
public:
143-
ALIGN(16) R_constant_array a_pixel;
144-
ALIGN(16) R_constant_array a_vertex;
140+
alignas(16) R_constant_array a_pixel;
141+
alignas(16) R_constant_array a_vertex;
145142

146143
void flush_cache();
147144

148-
public:
149145
// fp, non-array versions
150146
ICF void set(R_constant* C, const Fmatrix& A)
151147
{

0 commit comments

Comments
 (0)