| 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 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 T* begin() { | 293 T* begin() { |
| 294 return fItemArray; | 294 return fItemArray; |
| 295 } | 295 } |
| 296 const T* begin() const { | 296 const T* begin() const { |
| 297 return fItemArray; | 297 return fItemArray; |
| 298 } | 298 } |
| 299 T* end() { | 299 T* end() { |
| 300 return fItemArray ? fItemArray + fCount : NULL; | 300 return fItemArray ? fItemArray + fCount : NULL; |
| 301 } | 301 } |
| 302 const T* end() const { | 302 const T* end() const { |
| 303 return fItemArray ? fItemArray + fCount : NULL;; | 303 return fItemArray ? fItemArray + fCount : NULL; |
| 304 } | 304 } |
| 305 | 305 |
| 306 /** | 306 /** |
| 307 * Get the i^th element. | 307 * Get the i^th element. |
| 308 */ | 308 */ |
| 309 T& operator[] (int i) { | 309 T& operator[] (int i) { |
| 310 SkASSERT(i < fCount); | 310 SkASSERT(i < fCount); |
| 311 SkASSERT(i >= 0); | 311 SkASSERT(i >= 0); |
| 312 return fItemArray[i]; | 312 return fItemArray[i]; |
| 313 } | 313 } |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |