Utility/FieldOffsets: Add GetLayout method

This commit is contained in:
Jérôme Leclercq 2022-01-23 19:59:44 +01:00
parent b8a52b93e8
commit 97356349fe
2 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,7 @@ namespace Nz
inline std::size_t GetAlignedSize() const;
inline std::size_t GetLargestFieldAlignement() const;
inline StructLayout GetLayout() const;
inline std::size_t GetSize() const;
FieldOffsets& operator=(const FieldOffsets&) = default;

View File

@ -23,6 +23,11 @@ namespace Nz
return m_largestFieldAlignment;
}
inline StructLayout FieldOffsets::GetLayout() const
{
return m_layout;
}
inline std::size_t FieldOffsets::GetAlignedSize() const
{
if (m_layout == StructLayout::Std140)