From 192f7339e98c95767c72d71b416a4bb7e067ea1b Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:59:08 +0300 Subject: [PATCH] Correct CSchemaSystemTypeScope::m_AtomicsCollectionOfT --- public/schemasystem/schemasystem.h | 4 ++-- public/schemasystem/schematypes.h | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/public/schemasystem/schemasystem.h b/public/schemasystem/schemasystem.h index 1446cd1e..452d704e 100644 --- a/public/schemasystem/schemasystem.h +++ b/public/schemasystem/schemasystem.h @@ -44,7 +44,7 @@ public: virtual SchemaMetaInfoHandle_t Type_Atomic_T( const char* pszAtomicName, uint16 nSize, uint8 nAlignment, CSchemaType* pTemplateType ) = 0; virtual SchemaMetaInfoHandle_t Type_Atomic_CollectionOfT( const char* pszAtomicName, uint16 nSize, uint8 nAlignment, uint16 nElementSize, CSchemaType* pTemplateType, uint64 nFixedBufferCount, SchemaCollectionManipulatorFn_t manipulator ) = 0; virtual SchemaMetaInfoHandle_t Type_Atomic_TT( const char* pszAtomicName, uint16 nSize, uint8 nAlignment, CSchemaType* pTemplateType, CSchemaType* pTemplateType2 ) = 0; - virtual SchemaMetaInfoHandle_t Type_Atomic_I( const char* pszAtomicName, uint16 nSize, uint8 nAlignment, int nInterger ) = 0; + virtual SchemaMetaInfoHandle_t Type_Atomic_I( const char* pszAtomicName, uint16 nSize, uint8 nAlignment, int nInteger ) = 0; virtual SchemaMetaInfoHandle_t Type_DeclaredClass( const char* pszClassName ) = 0; virtual SchemaMetaInfoHandle_t Type_DeclaredEnum( const char* pszEnumName ) = 0; virtual SchemaMetaInfoHandle_t Type_FixedArray( CSchemaType* pElementType, int nElementCount, uint16 nElementSize, uint8 nElementAlignment ) = 0; @@ -89,7 +89,7 @@ public: CSchemaPtrMap, CSchemaType_Ptr*> m_Pointers; CSchemaPtrMap m_Atomics; CSchemaPtrMap m_AtomicsT; - CSchemaPtrMap m_AtomicsCollectionOfT; + CSchemaPtrMap m_AtomicsCollectionOfT; CSchemaPtrMap m_AtomicsTT; CSchemaPtrMap m_AtomicsI; CSchemaPtrMap m_DeclaredClasses; diff --git a/public/schemasystem/schematypes.h b/public/schemasystem/schematypes.h index ce6a94d1..a7e367ad 100644 --- a/public/schemasystem/schematypes.h +++ b/public/schemasystem/schematypes.h @@ -448,6 +448,28 @@ struct AtomicTypeInfo_T_t SchemaCollectionManipulatorFn_t m_pfnManipulator; }; +struct AtomicTypeInfo_CollectionOfT_t +{ + bool operator<( const AtomicTypeInfo_CollectionOfT_t &rhs ) const + { + if(m_nAtomicID != rhs.m_nAtomicID) + return m_nAtomicID < rhs.m_nAtomicID; + + if(m_pTemplateType != rhs.m_pTemplateType) + return m_pTemplateType < rhs.m_pTemplateType; + + if(m_nFixedBufferCount != rhs.m_nFixedBufferCount) + return m_nFixedBufferCount < rhs.m_nFixedBufferCount; + + return (void *)m_pfnManipulator < (void *)rhs.m_pfnManipulator; + } + + int m_nAtomicID; + CSchemaType *m_pTemplateType; + uint64 m_nFixedBufferCount; + SchemaCollectionManipulatorFn_t m_pfnManipulator; +}; + struct AtomicTypeInfo_TT_t { bool operator<( const AtomicTypeInfo_TT_t& rhs ) const