소스 검색

arraynd: Removing useless method ComputeTotalSize.

undefined
Guillaume Bittoun Sam Hocevar <sam@hocevar.net> 11 년 전
부모
커밋
b8c5f58826
1개의 변경된 파일5개의 추가작업 그리고 10개의 파일을 삭제
  1. +5
    -10
      src/lol/math/arraynd.h

+ 5
- 10
src/lol/math/arraynd.h 파일 보기

@@ -189,26 +189,21 @@ public:
return proxy(this, m_sizes, pos, m_sizes[0]);
}

inline size_t ComputeTotalSize(vec_t<size_t, N> sizes)
/* Resize the array.
* FIXME: data gets scrambled; should we care? */
inline void SetSize(vec_t<size_t, N> sizes, element_t e = element_t())
{
size_t total_size = 1;

for (auto size : sizes)
total_size *= size;

return total_size;
}

/* Resize the array.
* FIXME: data gets scrambled; should we care? */
inline void SetSize(vec_t<size_t, N> sizes, element_t e = element_t())
{
this->Resize(ComputeTotalSize(sizes), e);
this->Resize(total_size, e);
}

inline vec_t<size_t, N> GetSize() const
{
return ComputeTotalSize(this->m_sizes);
return this->m_sizes;
}

public:


불러오는 중...
취소
저장