| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkTemplates_DEFINED | 10 #ifndef SkTemplates_DEFINED |
| 11 #define SkTemplates_DEFINED | 11 #define SkTemplates_DEFINED |
| 12 | 12 |
| 13 #include "SkMath.h" | 13 #include "SkMath.h" |
| 14 #include "SkTLogic.h" | 14 #include "SkTLogic.h" |
| 15 #include "SkTypes.h" | 15 #include "SkTypes.h" |
| 16 #include "SkUniquePtr.h" | 16 #include "SkUniquePtr.h" |
| 17 #include "SkUtility.h" | |
| 18 #include <limits.h> | 17 #include <limits.h> |
| 19 #include <new> | 18 #include <new> |
| 20 | 19 |
| 21 /** \file SkTemplates.h | 20 /** \file SkTemplates.h |
| 22 | 21 |
| 23 This file contains light-weight template classes for type-safe and exception
-safe | 22 This file contains light-weight template classes for type-safe and exception
-safe |
| 24 resource management. | 23 resource management. |
| 25 */ | 24 */ |
| 26 | 25 |
| 27 /** | 26 /** |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 * Returns void* because this object does not initialize the | 449 * Returns void* because this object does not initialize the |
| 451 * memory. Use placement new for types that require a cons. | 450 * memory. Use placement new for types that require a cons. |
| 452 */ | 451 */ |
| 453 void* get() { return fStorage.get(); } | 452 void* get() { return fStorage.get(); } |
| 454 const void* get() const { return fStorage.get(); } | 453 const void* get() const { return fStorage.get(); } |
| 455 private: | 454 private: |
| 456 SkAlignedSStorage<sizeof(T)*N> fStorage; | 455 SkAlignedSStorage<sizeof(T)*N> fStorage; |
| 457 }; | 456 }; |
| 458 | 457 |
| 459 #endif | 458 #endif |
| OLD | NEW |