Esempio n. 1
0
        private void SetKeyGroupDataU16(List <short> buffer, Group group)
        {
            var values = GetKeyGroupDataU16(group);

            if (values.Length == 1 && buffer.Contains(values[0]))
            {
                group.BeginIndex = (uint)buffer.IndexOf(values[0]);
            }
            else
            {
                int index = CompareUtility.SearchArray <short>(buffer.ToArray(), values);
                if (index != -1)
                {
                    group.BeginIndex = (uint)index;
                }
                else
                {
                    group.BeginIndex = (uint)buffer.Count;
                    buffer.AddRange(values);
                }
            }
        }