示例#1
0
        /// <summary>
        /// Internal function to call into the property system to construct / initialize elements.
        /// </summary>
        /// <param name="index"First item to construct.></param>
        private void ConstructItem(int index)
        {
            bool zeroElement = Native_UProperty.HasAnyPropertyFlags(elementProp, EPropertyFlags.ZeroConstructor);

            IntPtr dest = GetElementPtrWithoutCheck(index);

            if (zeroElement)
            {
                // If any nested property needs zeroing, just pre-zero the whole space
                FMemory.Memzero(dest, setLayout.Size);
            }

            if (!zeroElement)
            {
                Native_UProperty.InitializeValue_InContainer(elementProp, dest);
            }
        }
示例#2
0
        /// <summary>
        /// Internal function to call into the property system to construct / initialize elements.
        /// </summary>
        /// <param name="index">First item to construct.</param>
        private void ConstructItem(int index)
        {
            bool zeroKey   = Native_UProperty.HasAnyPropertyFlags(keyProp, EPropertyFlags.ZeroConstructor);
            bool zeroValue = Native_UProperty.HasAnyPropertyFlags(valueProp, EPropertyFlags.ZeroConstructor);

            IntPtr dest = GetPairPtrWithoutCheck(index);

            if (zeroKey || zeroValue)
            {
                // If any nested property needs zeroing, just pre-zero the whole space
                FMemory.Memzero(dest, mapLayout.SetLayout.Size);
            }

            if (!zeroKey)
            {
                Native_UProperty.InitializeValue_InContainer(keyProp, dest);
            }

            if (!zeroValue)
            {
                Native_UProperty.InitializeValue_InContainer(valueProp, dest);
            }
        }