Explorar el Código

math: fix unallowed access to private data in vec_t.

undefined
Sam Hocevar hace 11 años
padre
commit
9f69882076
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/lol/math/vector.h

+ 2
- 2
src/lol/math/vector.h Ver fichero

@@ -115,7 +115,7 @@ struct vec_t<T, N, FULL_SWIZZLE>
inline vec_t(vec_t<T,N> const &v) inline vec_t(vec_t<T,N> const &v)
{ {
for (int i = 0; i < N; ++i) for (int i = 0; i < N; ++i)
m_data[i] = v.m_data[i];
m_data[i] = v[i];
} }
inline ~vec_t() {} inline ~vec_t() {}


@@ -124,7 +124,7 @@ struct vec_t<T, N, FULL_SWIZZLE>
explicit inline vec_t(vec_t<U, N> const &v) explicit inline vec_t(vec_t<U, N> const &v)
{ {
for (int i = 0; i < N; ++i) for (int i = 0; i < N; ++i)
m_data[i] = (T)v.m_data[i];
m_data[i] = (T)v[i];
} }


/* Constructor for initializer_list. We need these ugly /* Constructor for initializer_list. We need these ugly


Cargando…
Cancelar
Guardar