| OLD | NEW |
| 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 |
| 11 #include "../private/SkTemplates.h" |
| 12 #include "SkTypes.h" |
| 13 |
| 11 #include <new> | 14 #include <new> |
| 12 #include "SkTypes.h" | |
| 13 #include "SkTemplates.h" | |
| 14 | 15 |
| 15 template <typename T, bool MEM_COPY = false> class SkTArray; | 16 template <typename T, bool MEM_COPY = false> class SkTArray; |
| 16 | 17 |
| 17 namespace SkTArrayExt { | 18 namespace SkTArrayExt { |
| 18 | 19 |
| 19 template<typename T> | 20 template<typename T> |
| 20 inline void copy(SkTArray<T, true>* self, int dst, int src) { | 21 inline void copy(SkTArray<T, true>* self, int dst, int src) { |
| 21 memcpy(&self->fItemArray[dst], &self->fItemArray[src], sizeof(T)); | 22 memcpy(&self->fItemArray[dst], &self->fItemArray[src], sizeof(T)); |
| 22 } | 23 } |
| 23 template<typename T> | 24 template<typename T> |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 SkSTArray& operator= (const INHERITED& array) { | 541 SkSTArray& operator= (const INHERITED& array) { |
| 541 INHERITED::operator=(array); | 542 INHERITED::operator=(array); |
| 542 return *this; | 543 return *this; |
| 543 } | 544 } |
| 544 | 545 |
| 545 private: | 546 private: |
| 546 SkAlignedSTStorage<N,T> fStorage; | 547 SkAlignedSTStorage<N,T> fStorage; |
| 547 }; | 548 }; |
| 548 | 549 |
| 549 #endif | 550 #endif |
| OLD | NEW |