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:
parent
5520ec0ea0
commit
7514b57ebf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user