Changed Util::IsEqual to Util::Compare.
This commit is contained in:
@@ -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
|
||||
|
11
src/Util.cpp
11
src/Util.cpp
@@ -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;
|
||||
|
Reference in New Issue
Block a user