mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed AddStackMarkableObject with base append fields
This commit is contained in:
parent
9baf0ead21
commit
d9ce23ac8e
3 changed files with 18 additions and 9 deletions
|
@ -16739,14 +16739,8 @@ void BfExprEvaluator::CreateObject(BfObjectCreateExpression* objCreateExpr, BfAs
|
|||
|
||||
if (!needsCall)
|
||||
{
|
||||
for (auto& fieldInst : typeInstance->mFieldInstances)
|
||||
{
|
||||
if (fieldInst.IsAppendedObject())
|
||||
{
|
||||
if (typeInstance->HasAppendedField(true))
|
||||
needsCall = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needsCall)
|
||||
|
|
|
@ -2483,6 +2483,20 @@ bool BfTypeInstance::BaseHasAppendCtor()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool BfTypeInstance::HasAppendedField(bool checkBase)
|
||||
{
|
||||
for (auto& fieldInstance : mFieldInstances)
|
||||
{
|
||||
if (fieldInstance.IsAppendedObject())
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((checkBase) && (mBaseType != NULL))
|
||||
return mBaseType->HasAppendedField(checkBase);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void BfTypeInstance::ReportMemory(MemReporter* memReporter)
|
||||
{
|
||||
if (mGenericTypeInfo != NULL)
|
||||
|
|
|
@ -2219,6 +2219,7 @@ public:
|
|||
bool IsAnonymousInitializerType();
|
||||
bool HasAppendCtor();
|
||||
bool BaseHasAppendCtor();
|
||||
bool HasAppendedField(bool checkBase);
|
||||
|
||||
virtual void ReportMemory(MemReporter* memReporter) override;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue