2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-06-28 23:31:54 +00:00

Make sure fastfile offset is taken after alignment, marking following is done on the originally written data and writing partially uses the original data when writing dynamic sized data

too lazy to split into single commits
This commit is contained in:
Jan
2021-03-19 15:09:44 +01:00
parent 5443ed4261
commit 2f700a48a9
6 changed files with 145 additions and 40 deletions

View File

@ -98,6 +98,15 @@ std::string BaseTemplate::MakeMemberAccess(StructureInformation* info, MemberInf
return str.str();
}
std::string BaseTemplate::MakeMemberAccess(const std::string& variableName, StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier)
{
std::ostringstream str;
str << variableName << "->" << member->m_member->m_name;
MakeArrayIndicesInternal(modifier, str);
return str.str();
}
std::string BaseTemplate::MakeTypeDecl(const TypeDeclaration* decl)
{
std::ostringstream str;

View File

@ -40,6 +40,7 @@ protected:
static std::string MakeTypePtrVarName(const DataDefinition* def);
static std::string MakeSafeTypeName(const DataDefinition* def);
static std::string MakeMemberAccess(StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier);
static std::string MakeMemberAccess(const std::string& variableName, StructureInformation* info, MemberInformation* member, const DeclarationModifierComputations& modifier);
static std::string MakeTypeDecl(const TypeDeclaration* decl);
static std::string MakeFollowingReferences(const std::vector<DeclarationModifier*>& modifiers);
static std::string MakeArrayIndices(const DeclarationModifierComputations& modifierComputations);