#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;
            --size;
        }
        return size ? *left - *right : 0;
    }

    // TODO: homemade versions
#define MemSet memset
#define MemCopy memcpy
} // namespace Juliet
