Browse Source

arraynd: Removing useless method ComputeTotalSize.

undefined
Guillaume Bittoun Sam Hocevar <sam@hocevar.net> 10 years ago
parent
commit
b8c5f58826
1 changed files with 5 additions and 10 deletions
  1. +5
    -10
      src/lol/math/arraynd.h

+ 5
- 10
src/lol/math/arraynd.h View File

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


Loading…
Cancel
Save