mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 13:31:59 +00:00
Convert serialization code to use less virtuals and allow more inlining.
This was SVN commit r7582.
This commit is contained in:
@@ -20,22 +20,27 @@
|
||||
#include "HashSerializer.h"
|
||||
|
||||
CHashSerializer::CHashSerializer(ScriptInterface& scriptInterface) :
|
||||
CBinarySerializer(scriptInterface)
|
||||
CBinarySerializer<CHashSerializerImpl>(scriptInterface)
|
||||
{
|
||||
}
|
||||
|
||||
size_t CHashSerializer::GetHashLength()
|
||||
{
|
||||
return HashFunc::DIGESTSIZE;
|
||||
return m_Impl.GetHashLength();
|
||||
}
|
||||
|
||||
const u8* CHashSerializer::ComputeHash()
|
||||
{
|
||||
return m_Impl.ComputeHash();
|
||||
}
|
||||
|
||||
size_t CHashSerializerImpl::GetHashLength()
|
||||
{
|
||||
return HashFunc::DIGESTSIZE;
|
||||
}
|
||||
|
||||
const u8* CHashSerializerImpl::ComputeHash()
|
||||
{
|
||||
m_Hash.Final(m_HashData);
|
||||
return m_HashData;
|
||||
}
|
||||
|
||||
void CHashSerializer::Put(const char* UNUSED(name), const u8* data, size_t len)
|
||||
{
|
||||
m_Hash.Update(data, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user