Lines Matching full:count
31 SkTDArray(const T src[], size_t count) {
32 SkASSERT(src || count == 0);
39 if (count) {
40 fArray = (T*)sk_malloc_throw(count * sizeof(T));
44 memcpy(fArray, src, sizeof(T) * count);
45 fReserve = fCount = count;
101 int count() const { return fCount; }
127 void setCount(size_t count) {
128 if (count > fReserve) {
129 this->growBy(count - fCount);
131 fCount = count;
138 size_t count = fCount;
140 fCount = count;
153 T* append(size_t count, const T* src = NULL) {
155 if (count) {
157 src + count <= fArray || fArray + oldCount <= src);
159 this->growBy(count);
161 memcpy(fArray + oldCount, src, sizeof(T) * count);
176 T* insert(size_t index, size_t count, const T* src = NULL) {
177 SkASSERT(count);
180 this->growBy(count);
182 memmove(dst + count, dst, sizeof(T) * (oldCount - index));
184 memcpy(dst, src, sizeof(T) * count);
189 void remove(size_t index, size_t count = 1) {
190 SkASSERT(index + count <= fCount);
191 fCount = fCount - count;
192 memmove(fArray + index, fArray + index + count, sizeof(T) * (fCount - index));