mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Allow IOnTypeInit for method declarations
This commit is contained in:
parent
35584ef288
commit
3b412719fe
4 changed files with 78 additions and 25 deletions
|
@ -1569,6 +1569,29 @@ BfMethodRefType::~BfMethodRefType()
|
|||
BF_ASSERT(mMethodRef == NULL);
|
||||
}
|
||||
|
||||
BfMethodInstanceGroup::BfMethodInstanceGroup(BfMethodInstanceGroup&& prev) noexcept
|
||||
{
|
||||
mOwner = prev.mOwner;
|
||||
mDefault = prev.mDefault;
|
||||
mMethodSpecializationMap = prev.mMethodSpecializationMap;
|
||||
mMethodIdx = prev.mMethodIdx;
|
||||
mRefCount = prev.mRefCount;
|
||||
mOnDemandKind = prev.mOnDemandKind;
|
||||
if (mDefault != NULL)
|
||||
mDefault->mMethodInstanceGroup = this;
|
||||
if (mMethodSpecializationMap != NULL)
|
||||
{
|
||||
for (auto& pair : *mMethodSpecializationMap)
|
||||
pair.mValue->mMethodInstanceGroup = this;
|
||||
}
|
||||
mDefaultCustomAttributes = prev.mDefaultCustomAttributes;
|
||||
prev.mDefaultCustomAttributes = NULL;
|
||||
|
||||
prev.mRefCount = 0;
|
||||
prev.mDefault = NULL;
|
||||
prev.mMethodSpecializationMap = NULL;
|
||||
}
|
||||
|
||||
BfMethodInstanceGroup::~BfMethodInstanceGroup()
|
||||
{
|
||||
if (mRefCount != 0)
|
||||
|
@ -1582,6 +1605,7 @@ BfMethodInstanceGroup::~BfMethodInstanceGroup()
|
|||
delete kv.mValue;
|
||||
delete mMethodSpecializationMap;
|
||||
}
|
||||
delete mDefaultCustomAttributes;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue