Test
This commit is contained in:
@@ -142,10 +142,10 @@ namespace ehs
|
||||
|
||||
Type* result = new Type[hierarchySize + 1];
|
||||
|
||||
result[0] = newType;
|
||||
result[0] = (Type&&)newType;
|
||||
|
||||
for (UInt_64 i = 1; i < hierarchySize; i++)
|
||||
result[i] = hierarchy[i];
|
||||
for (UInt_64 i = 0; i < hierarchySize; i++)
|
||||
result[i + 1] = (Type&&)hierarchy[i];
|
||||
|
||||
hierarchySize++;
|
||||
delete[] hierarchy;
|
||||
|
41
src/Type.cpp
41
src/Type.cpp
@@ -12,6 +12,47 @@ namespace ehs
|
||||
{
|
||||
}
|
||||
|
||||
Type::Type(Type&& type) noexcept
|
||||
: size(type.size), id(type.id), hashId(type.hashId)
|
||||
{
|
||||
type.size = 0;
|
||||
type.id = nullptr;
|
||||
type.hashId = 0;
|
||||
}
|
||||
|
||||
Type::Type(const Type& type)
|
||||
: size(type.size), id(type.id), hashId(type.hashId)
|
||||
{
|
||||
}
|
||||
|
||||
Type& Type::operator=(Type&& type) noexcept
|
||||
{
|
||||
if (this == &type)
|
||||
return *this;
|
||||
|
||||
size = type.size;
|
||||
id = type.id;
|
||||
hashId = type.hashId;
|
||||
|
||||
type.size = 0;
|
||||
type.id = nullptr;
|
||||
type.hashId = 0;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Type& Type::operator=(const Type& type)
|
||||
{
|
||||
if (this == &type)
|
||||
return *this;
|
||||
|
||||
size = type.size;
|
||||
id = type.id;
|
||||
hashId = type.hashId;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool Type::operator==(const Type& type) const
|
||||
{
|
||||
return hashId == type.hashId;
|
||||
|
Reference in New Issue
Block a user