diff --git a/src/ZoneCodeGenerator/Generating/Templates/Loading/SinglePointer.stg b/src/ZoneCodeGenerator/Generating/Templates/Loading/SinglePointer.stg index c988f8b5..aee93e64 100644 --- a/src/ZoneCodeGenerator/Generating/Templates/Loading/SinglePointer.stg +++ b/src/ZoneCodeGenerator/Generating/Templates/Loading/SinglePointer.stg @@ -7,23 +7,25 @@ $if(member.Computations.IsTempBlock)$ $member.Member.VariableType.Type.FullName$* ptr = $TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$; $endif$$\\$ -$TypeVarName(structure.Type)$->$member.Member.Name$ = m_stream->Alloc<$TypeDeclaration(member.Member.VariableType)$$PrintFollowingReferences(reference.FollowingReferences)$>(alignof($TypeDeclaration(member.Member.VariableType)$$PrintFollowingReferences(reference.FollowingReferences)$)); // $member.Member.VariableType.Type.Alignment$ +$TypeVarName(structure.Type)$->$member.Member.Name$ = m_stream->Alloc<$TypeDeclaration(member.Member.VariableType)$$PrintFollowingReferences(reference.FollowingReferences)$>(alignof($TypeDeclaration(member.Member.VariableType)$$PrintFollowingReferences(reference.FollowingReferences)$)); // $member.Member.VariableType.Type.Alignment$$\\$ $\\$ $\\$ -$if(member.Computations.IsTempBlock)$ +$if(member.Computations.IsTempBlock)$ + $member.Member.VariableType.Type.FullName$** toInsert = nullptr; if(ptr == PTR_INSERT) toInsert = m_stream->InsertPointer<$member.Member.VariableType.Type.FullName$>(); + $endif$$\\$ - +$\\$ +$\\$ $if(member.StructureType && !member.StructureType.IsLeaf && !member.Computations.IsRuntimeBlock)$ - $TypeVarName(member.Member.VariableType.Type)$ = $TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$; Load_$member.Member.VariableType.Type.Name$(true);$\\$ $else$ m_stream->Load<$TypeDeclaration(member.Member.VariableType)$$PrintFollowingReferences(reference.FollowingReferences)$>($TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$);$\\$ $endif$$\\$ - +$\\$ $if(member.Computations.IsTempBlock)$ if(toInsert != nullptr) @@ -45,7 +47,7 @@ if($TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(referen else { $TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$ = m_stream->ConvertOffsetToAlias($TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$); -} +}$\\$ $else$ if($TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$ == PTR_FOLLOWING) { @@ -54,7 +56,7 @@ if($TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(referen else { $TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$ = m_stream->ConvertOffsetToPointer($TypeVarName(structure.Type)$->$member.Member.Name$$PrintArrayIndices(reference)$); -} +}$\\$ $endif$ >>