Beispiel #1
0
        public void ClearChanged(int index)
        {
            int block = UpdateMask.GetBlockIndex(index);

            if (block >= _updateMask.Count)
            {
                _updateMask.Add(0);
            }

            _updateMask[block] &= ~(uint)UpdateMask.GetBlockFlag(index);
        }
Beispiel #2
0
 public void RemoveValue(int index)
 {
     // remove by shifting entire container - client might rely on values being sorted for certain fields
     _values.RemoveAt(index);
     for (int i = index; i < _values.Count; ++i)
     {
         MarkChanged(i);
         // also mark all fields of value as changed
         MarkAllUpdateMaskFields(_values[i]);
     }
     if ((_values.Count % 32) != 0)
     {
         _updateMask[UpdateMask.GetBlockIndex(_values.Count)] &= (uint)~UpdateMask.GetBlockFlag(_values.Count);
     }
     else
     {
         _updateMask.RemoveAt(_updateMask.Count - 1);
     }
 }