1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Replace MemZero with memset.

This commit is contained in:
Darryl Pogue
2012-01-21 15:53:29 -08:00
committed by Adam Johnson
parent 7d7d7d273f
commit 72fdf8de32
8 changed files with 16 additions and 28 deletions

View File

@ -260,7 +260,7 @@ void TBuffer<T>::SetCount (unsigned count) {
template<class T>
void TBuffer<T>::Zero () {
if (m_data)
MemZero(m_data, Bytes());
memset(m_data, 0, Bytes());
}
typedef TBuffer<uint8_t> CBuffer;
@ -678,7 +678,7 @@ const T * TFArray<T,C>::Top () const {
template<class T, class C>
void TFArray<T,C>::Zero () {
C::Destruct(m_data, m_count);
MemZero(m_data, m_count * sizeof(T));
memset(m_data, 0, m_count * sizeof(T));
C::Construct(m_data, m_count);
}
@ -694,7 +694,7 @@ template<class T, class C>
void TFArray<T,C>::ZeroRange (unsigned index, unsigned count) {
ASSERT(index + count <= m_count);
C::Destruct(m_data + index, count);
MemZero(m_data + index, count * sizeof(T));
memset(m_data + index, 0, count * sizeof(T));
C::Construct(m_data + index, count);
}