Add a structured data flag for fixed-size arrays

This commit is contained in:
baldurk
2018-02-16 09:39:46 +00:00
parent 7c7a4ae5ea
commit de64755667
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -130,6 +130,11 @@ DOCUMENT(R"(Bitfield flags that could be applied to a type.
.. data:: NullString
Special flag to indicate that this is a C-string which was NULL, not just empty.
.. data:: FixedArray
Special flag to indicate that this is array was a fixed-size real array, rather than a complex
container type or a pointer & length.
)");
enum class SDTypeFlags : uint32_t
{
@@ -138,6 +143,7 @@ enum class SDTypeFlags : uint32_t
Hidden = 0x2,
Nullable = 0x4,
NullString = 0x8,
FixedArray = 0x10,
};
BITMASK_OPERATORS(SDTypeFlags);
+1
View File
@@ -538,6 +538,7 @@ public:
SDObject &arr = *m_StructureStack.back();
arr.type.basetype = SDBasic::Array;
arr.type.byteSize = N;
arr.type.flags |= SDTypeFlags::FixedArray;
arr.data.basic.numChildren = (uint64_t)N;
arr.data.children.resize(N);