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:
@@ -12,6 +12,10 @@
|
|||||||
|
|
||||||
|
|
||||||
struct CheckSum {
|
struct CheckSum {
|
||||||
|
const uint8* Data() const
|
||||||
|
{
|
||||||
|
return fData;
|
||||||
|
}
|
||||||
|
|
||||||
bool IsZero() const
|
bool IsZero() const
|
||||||
{
|
{
|
||||||
@@ -29,6 +33,12 @@ struct CheckSum {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckSum& operator=(const void* buffer)
|
||||||
|
{
|
||||||
|
memcpy(fData, buffer, sizeof(fData));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator==(const void* buffer) const
|
bool operator==(const void* buffer) const
|
||||||
{
|
{
|
||||||
return memcmp(fData, buffer, sizeof(fData)) == 0;
|
return memcmp(fData, buffer, sizeof(fData)) == 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user