mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
implement pointerarray
This commit is contained in:
parent
226c589bb8
commit
11eb9ae4ce
@ -242,7 +242,7 @@ const IEvaluation* DeclarationModifierComputations::GetDynamicArraySizeEvaluatio
|
|||||||
return dynamic_cast<ArrayDeclarationModifier*>(declarationModifier)->m_dynamic_size_evaluation.get();
|
return dynamic_cast<ArrayDeclarationModifier*>(declarationModifier)->m_dynamic_size_evaluation.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
int DeclarationModifierComputations::GetAlignment() const
|
unsigned DeclarationModifierComputations::GetAlignment() const
|
||||||
{
|
{
|
||||||
const auto following = GetFollowingDeclarationModifiers();
|
const auto following = GetFollowingDeclarationModifiers();
|
||||||
|
|
||||||
|
@ -31,5 +31,5 @@ public:
|
|||||||
_NODISCARD const IEvaluation* GetPointerArrayCountEvaluation() const;
|
_NODISCARD const IEvaluation* GetPointerArrayCountEvaluation() const;
|
||||||
_NODISCARD bool IsDynamicArray() const;
|
_NODISCARD bool IsDynamicArray() const;
|
||||||
_NODISCARD const IEvaluation* GetDynamicArraySizeEvaluation() const;
|
_NODISCARD const IEvaluation* GetDynamicArraySizeEvaluation() const;
|
||||||
_NODISCARD int GetAlignment() const;
|
_NODISCARD unsigned GetAlignment() const;
|
||||||
};
|
};
|
||||||
|
@ -726,7 +726,15 @@ class ZoneLoadTemplate::Internal final : BaseTemplate
|
|||||||
|
|
||||||
void LoadMember_PointerArray(StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier) const
|
void LoadMember_PointerArray(StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier) const
|
||||||
{
|
{
|
||||||
LINE("// LoadPointerArray: " << member->m_member->m_name)
|
LINE(MakeTypePtrVarName(member->m_member->m_type_declaration->m_type) << " = " << MakeMemberAccess(info, member, modifier) << ";")
|
||||||
|
if (modifier.IsArray())
|
||||||
|
{
|
||||||
|
LINE("LoadPtrArray_"<<MakeSafeTypeName(member->m_member->m_type_declaration->m_type)<<"(false, "<<modifier.GetArraySize()<<");")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LINE("LoadPtrArray_"<<MakeSafeTypeName(member->m_member->m_type_declaration->m_type)<<"(true, "<<MakeEvaluation(modifier.GetPointerArrayCountEvaluation())<<");")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadMember_EmbeddedArray(StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier) const
|
void LoadMember_EmbeddedArray(StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier) const
|
||||||
@ -899,7 +907,7 @@ class ZoneLoadTemplate::Internal final : BaseTemplate
|
|||||||
const auto followingReferences = MakeFollowingReferences(modifier.GetFollowingDeclarationModifiers());
|
const auto followingReferences = MakeFollowingReferences(modifier.GetFollowingDeclarationModifiers());
|
||||||
LINE(MakeMemberAccess(info, member, modifier)<<" = m_stream->Alloc<"<<typeDecl<<followingReferences<<">(alignof("<<typeDecl<<followingReferences
|
LINE(MakeMemberAccess(info, member, modifier)<<" = m_stream->Alloc<"<<typeDecl<<followingReferences<<">(alignof("<<typeDecl<<followingReferences
|
||||||
<<")); // " << modifier.GetAlignment())
|
<<")); // " << modifier.GetAlignment())
|
||||||
|
|
||||||
if (computations.IsInTempBlock())
|
if (computations.IsInTempBlock())
|
||||||
{
|
{
|
||||||
LINE("")
|
LINE("")
|
||||||
@ -994,6 +1002,11 @@ class ZoneLoadTemplate::Internal final : BaseTemplate
|
|||||||
return loadType == MemberLoadType::POINTER_ARRAY;
|
return loadType == MemberLoadType::POINTER_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (loadType == MemberLoadType::POINTER_ARRAY)
|
||||||
|
{
|
||||||
|
return !modifier.IsArray();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user