Lines Matching refs:that
4 * Use of this source code is governed by a BSD-style license that can be
48 * Creates an empty array that will preallocate space for reserveCount
56 SkTArray(const SkTArray& that)
57 : SkTArray(that.fItemArray, that.fCount) {}
59 SkTArray(SkTArray&& that) {
60 if (that.fOwnMemory) {
61 fItemArray = that.fItemArray;
62 fCount = that.fCount;
63 fAllocCount = that.fAllocCount;
65 fReserved = that.fReserved;
67 that.fItemArray = nullptr;
68 that.fCount = 0;
69 that.fAllocCount = 0;
70 that.fOwnMemory = true;
71 that.fReserved = false;
73 this->init(that.fCount);
74 that.move(fItemArray);
75 that.fCount = 0;
94 SkTArray& operator=(const SkTArray& that) {
95 if (this == &that) {
102 this->checkRealloc(that.count(), kExactFit);
103 fCount = that.fCount;
104 this->copy(that.fItemArray);
107 SkTArray& operator=(SkTArray&& that) {
108 if (this == &that) {
115 this->checkRealloc(that.count(), kExactFit);
116 fCount = that.fCount;
117 that.move(fItemArray);
118 that.fCount = 0;
147 // Set fCount to 0 before calling checkRealloc so that no elements are moved.
208 * the reference only remains valid until the next call that adds or removes
217 * Version of above that uses a copy constructor to initialize the new item
225 * Version of above that uses a move constructor to initialize the new item
242 * the start of that new range. Note: this address is only valid until the
243 * next API call made on the array that might add or remove elements.
255 * Version of above that uses a copy constructor to initialize all n items
268 * Version of above that uses a copy constructor to initialize the n items
282 * Version of above that uses the move constructor to set n items.
331 /** Swaps the contents of this array with that array. Does a pointer swap if possible,
333 void swap(SkTArray& that) {
335 if (this == &that) {
338 if (fOwnMemory && that.fOwnMemory) {
339 swap(fItemArray, that.fItemArray);
342 fCount = that.fCount;
343 that.fCount = count;
346 fAllocCount = that.fAllocCount;
347 that.fAllocCount = allocCount;
350 SkTArray copy(std::move(that));
351 that = std::move(*this);
443 * Creates an empty array that will use the passed storage block until it
499 // MEM_MOVE == true implies that the type is trivially movable, and not necessarily
527 // Helper function that makes space for n objects, adjusts the count, but does not initialize
546 // kMinHeapAllocCount, or a reserve count was specified that has yet to be exceeded.
593 * Subclass of SkTArray that contains a preallocated memory block for the array.
616 SkSTArray (const SkSTArray& that) : SkSTArray() { *this = that; }
617 explicit SkSTArray(const INHERITED& that) : SkSTArray() { *this = that; }
618 SkSTArray ( SkSTArray&& that) : SkSTArray() { *this = std::move(that); }
619 explicit SkSTArray( INHERITED&& that) : SkSTArray() { *this = std::move(that); }
621 SkSTArray& operator=(const SkSTArray& that) {
622 INHERITED::operator=(that);
625 SkSTArray& operator=(const INHERITED& that) {
626 INHERITED::operator=(that);
630 SkSTArray& operator=(SkSTArray&& that) {
631 INHERITED::operator=(std::move(that));
634 SkSTArray& operator=(INHERITED&& that) {
635 INHERITED::operator=(std::move(that));