24 lines
576 B
C++
24 lines
576 B
C++
#pragma once
|
|
|
|
#include <Core/Common/CoreTypes.h>
|
|
|
|
#define ArraySize(array) (sizeof(array) / sizeof(array[0]))
|
|
|
|
namespace Juliet
|
|
{
|
|
inline int32 MemCompare(const void* leftValue, const void* rightValue, size_t size)
|
|
{
|
|
auto left = static_cast<const unsigned char*>(leftValue);
|
|
auto right = static_cast<const unsigned char*>(rightValue);
|
|
while (size && *left == *right)
|
|
{
|
|
++left;
|
|
++right;
|
|
}
|
|
return size ? *left - *right : 0;
|
|
}
|
|
|
|
#define MemSet memset
|
|
#define MemCopy memcpy
|
|
} // namespace Juliet
|