Changed Util::IsEqual to Util::Compare.

This commit is contained in:
2023-12-21 18:51:51 -08:00
parent 49f69372a9
commit 7dcd903140
8 changed files with 31 additions and 20 deletions

View File

@@ -37,7 +37,7 @@ namespace ehs
if (size != CalcSize(inStr))
return false;
return Util::IsEqual(id, inStr, size);
return Util::Compare(id, inStr, size);
}
bool Type::operator!=(const Char_8* const inStr) const
@@ -45,7 +45,7 @@ namespace ehs
if (size != CalcSize(inStr))
return true;
return !Util::IsEqual(id, inStr, size);
return !Util::Compare(id, inStr, size);
}
UInt_64 Type::GetSize() const

View File

@@ -2,7 +2,7 @@
namespace ehs
{
bool Util::IsEqual(const void* const a, const void* const b, const UInt_64 size)
bool Util::Compare(const void* const a, const void* const b, const UInt_64 size)
{
Byte* aBytes = (Byte*)a;
Byte* bBytes = (Byte*)b;
@@ -79,6 +79,15 @@ namespace ehs
}
}
void Util::Fill(void* const out, const UInt_64 outSize, const void* const in, const UInt_64 inSize)
{
if (outSize % inSize)
return;
for (UInt_64 i = 0; i < outSize; i += inSize)
Copy(&((Byte*)out)[i], in, inSize);
}
void Util::Zero(void* const in, const UInt_64 size)
{
Byte* inB = (Byte*)in;