diff --git a/src/ZoneCodeGeneratorLib/Generating/Templates/AssetStructTestsTemplate.cpp b/src/ZoneCodeGeneratorLib/Generating/Templates/AssetStructTestsTemplate.cpp index 19929764..9eb80b88 100644 --- a/src/ZoneCodeGeneratorLib/Generating/Templates/AssetStructTestsTemplate.cpp +++ b/src/ZoneCodeGeneratorLib/Generating/Templates/AssetStructTestsTemplate.cpp @@ -14,7 +14,7 @@ class AssetStructTestsTemplate::Internal final : BaseTemplate LINE("{") m_intendation++; LINE("REQUIRE("<m_definition->GetSize()<<"u == sizeof("<m_definition->GetFullName()<<"));") - LINE("REQUIRE("<m_definition->GetAlignment()<<"u == alignof("<m_definition->GetFullName()<<"));") + LINE("// REQUIRE("<m_definition->GetAlignment()<<"u == alignof("<m_definition->GetFullName()<<"));") m_intendation--; LINE("}") } diff --git a/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneLoadTemplate.cpp b/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneLoadTemplate.cpp index 27271a81..cf75a4f6 100644 --- a/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneLoadTemplate.cpp +++ b/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneLoadTemplate.cpp @@ -133,7 +133,7 @@ class ZoneLoadTemplate::Internal final : BaseTemplate void PrintLoadPtrArrayMethod_Loading(const DataDefinition* def, StructureInformation* info) const { - LINE("*"<< MakeTypePtrVarName(def)<<" = m_stream->Alloc<"<GetFullName()<<">(alignof("<GetFullName()<<")); // "<GetAlignment()) + LINE("*"<< MakeTypePtrVarName(def)<<" = m_stream->Alloc<"<GetFullName()<<">("<< def->GetAlignment() <<");") if (info && !info->m_is_leaf) { @@ -237,7 +237,7 @@ class ZoneLoadTemplate::Internal final : BaseTemplate LINE("for(size_t index = 0; index < count; index++)") LINE("{") m_intendation++; - + LINE(MakeTypeVarName(info->m_definition) << " = var;") LINE("Load_"<m_definition->m_name<<"(false);") LINE("var++;") @@ -549,8 +549,12 @@ class ZoneLoadTemplate::Internal final : BaseTemplate const auto typeDecl = MakeTypeDecl(member->m_member->m_type_declaration.get()); const auto followingReferences = MakeFollowingReferences(modifier.GetFollowingDeclarationModifiers()); - LINE(MakeMemberAccess(info, member, modifier)<<" = m_stream->Alloc<"<(alignof("<Alloc<"<("<m_definition->GetFullName() << "* ptr = *" << MakeTypePtrVarName(info->m_definition) << ";") - LINE("*" << MakeTypePtrVarName(info->m_definition) << " = m_stream->Alloc<" << info->m_definition->GetFullName() << ">(alignof(" << info->m_definition->GetFullName() << "));") + LINE("*" << MakeTypePtrVarName(info->m_definition) << " = m_stream->Alloc<" << info->m_definition->GetFullName() << ">("<< info->m_definition->GetAlignment() <<");") LINE("") LINE(info->m_definition->GetFullName() << "** toInsert = nullptr;") LINE("if(ptr == PTR_INSERT)")