mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Appended fields
This commit is contained in:
parent
52544e6782
commit
1d2811f50d
22 changed files with 596 additions and 52 deletions
|
@ -498,6 +498,8 @@ void BfFieldInstance::GetDataRange(int& dataIdx, int& dataCount)
|
|||
int BfFieldInstance::GetAlign(int packing)
|
||||
{
|
||||
int align = mResolvedType->mAlign;
|
||||
if (IsAppendedObject())
|
||||
align = mResolvedType->ToTypeInstance()->mInstAlign;
|
||||
if (packing > 0)
|
||||
align = BF_MIN(align, packing);
|
||||
if (mCustomAttributes != NULL)
|
||||
|
@ -528,6 +530,12 @@ int BfFieldInstance::GetAlign(int packing)
|
|||
return align;
|
||||
}
|
||||
|
||||
bool BfFieldInstance::IsAppendedObject()
|
||||
{
|
||||
auto fieldDef = GetFieldDef();
|
||||
return (fieldDef != NULL) && (fieldDef->mIsAppend) && (mResolvedType->IsObject()) && (mOwner->IsObject());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int64 BfDeferredMethodCallData::GenerateMethodId(BfModule* module, int64 methodId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue