Added Data() getter and an assignment operator getting a raw buffer.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37637 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-07-20 23:14:48 +00:00
parent 5520ec0ea0
commit 7514b57ebf

View File

@ -12,6 +12,10 @@
struct CheckSum {
const uint8* Data() const
{
return fData;
}
bool IsZero() const
{
@ -29,6 +33,12 @@ struct CheckSum {
return *this;
}
CheckSum& operator=(const void* buffer)
{
memcpy(fData, buffer, sizeof(fData));
return *this;
}
bool operator==(const void* buffer) const
{
return memcmp(fData, buffer, sizeof(fData)) == 0;