Преглед изворни кода

math: fix unallowed access to private data in vec_t.

undefined
Sam Hocevar пре 11 година
родитељ
комит
9f69882076
1 измењених фајлова са 2 додато и 2 уклоњено
  1. +2
    -2
      src/lol/math/vector.h

+ 2
- 2
src/lol/math/vector.h Прегледај датотеку

@@ -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


Loading…
Откажи
Сачувај