コード例 #1
0
        public static FastValueArray <T> Cast(T[] items)
        {
            FastValueArray <T> thiz = new FastValueArray <T>();

            thiz.pool     = items;
            thiz.capacity = thiz.count = items.Length;
            return(thiz);
        }
コード例 #2
0
        public static FastValueArray <T> Copy(FastValueArray <T> src)
        {
            FastValueArray <T> newArr = new FastValueArray <T>(src.capacity);

            for (int n = 0, nMax = src.count; n < nMax; ++n)
            {
                newArr.Add(src[n]);
            }

            return(newArr);
        }
コード例 #3
0
 public object Clone()
 {
     return(FastValueArray <T> .Copy(this));
 }