Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: include/core/SkTArray.h

Issue 1259143006: Remove unnecessary virtual destructor on SkTArray (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTArray_DEFINED 8 #ifndef SkTArray_DEFINED
9 #define SkTArray_DEFINED 9 #define SkTArray_DEFINED
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 for (int i = 0; i < fCount; ++i) { 100 for (int i = 0; i < fCount; ++i) {
101 fItemArray[i].~T(); 101 fItemArray[i].~T();
102 } 102 }
103 fCount = 0; 103 fCount = 0;
104 this->checkRealloc((int)array.count()); 104 this->checkRealloc((int)array.count());
105 fCount = array.count(); 105 fCount = array.count();
106 SkTArrayExt::copy(this, static_cast<const T*>(array.fMemArray)); 106 SkTArrayExt::copy(this, static_cast<const T*>(array.fMemArray));
107 return *this; 107 return *this;
108 } 108 }
109 109
110 virtual ~SkTArray() { 110 ~SkTArray() {
111 for (int i = 0; i < fCount; ++i) { 111 for (int i = 0; i < fCount; ++i) {
112 fItemArray[i].~T(); 112 fItemArray[i].~T();
113 } 113 }
114 if (fMemArray != fPreAllocMemArray) { 114 if (fMemArray != fPreAllocMemArray) {
115 sk_free(fMemArray); 115 sk_free(fMemArray);
116 } 116 }
117 } 117 }
118 118
119 /** 119 /**
120 * Resets to count() == 0 120 * Resets to count() == 0
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 SkSTArray& operator= (const INHERITED& array) { 540 SkSTArray& operator= (const INHERITED& array) {
541 INHERITED::operator=(array); 541 INHERITED::operator=(array);
542 return *this; 542 return *this;
543 } 543 }
544 544
545 private: 545 private:
546 SkAlignedSTStorage<N,T> fStorage; 546 SkAlignedSTStorage<N,T> fStorage;
547 }; 547 };
548 548
549 #endif 549 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698