| Index: third_party/WebKit/Source/wtf/OwnPtrCommon.h
|
| diff --git a/third_party/WebKit/Source/wtf/OwnPtrCommon.h b/third_party/WebKit/Source/wtf/OwnPtrCommon.h
|
| index 89e24895029c0dac37743809b1784df3992a3703..f4297ee9344ee0148b11c1de30f558bb050c3694 100644
|
| --- a/third_party/WebKit/Source/wtf/OwnPtrCommon.h
|
| +++ b/third_party/WebKit/Source/wtf/OwnPtrCommon.h
|
| @@ -37,41 +37,39 @@ namespace WTF {
|
| class RefCountedBase;
|
| class ThreadSafeRefCountedBase;
|
|
|
| -template<typename T>
|
| +template <typename T>
|
| struct IsRefCounted {
|
| - STATIC_ONLY(IsRefCounted);
|
| - static const bool value = IsSubclass<T, RefCountedBase>::value
|
| - || IsSubclass<T, ThreadSafeRefCountedBase>::value;
|
| + STATIC_ONLY(IsRefCounted);
|
| + static const bool value = IsSubclass<T, RefCountedBase>::value ||
|
| + IsSubclass<T, ThreadSafeRefCountedBase>::value;
|
| };
|
|
|
| template <typename T>
|
| struct OwnedPtrDeleter {
|
| - STATIC_ONLY(OwnedPtrDeleter);
|
| - static void deletePtr(T* ptr)
|
| - {
|
| - static_assert(!IsRefCounted<T>::value, "use RefPtr for RefCounted objects");
|
| - static_assert(sizeof(T) > 0, "type must be complete");
|
| - delete ptr;
|
| - }
|
| + STATIC_ONLY(OwnedPtrDeleter);
|
| + static void deletePtr(T* ptr) {
|
| + static_assert(!IsRefCounted<T>::value, "use RefPtr for RefCounted objects");
|
| + static_assert(sizeof(T) > 0, "type must be complete");
|
| + delete ptr;
|
| + }
|
| };
|
|
|
| template <typename T>
|
| struct OwnedPtrDeleter<T[]> {
|
| - STATIC_ONLY(OwnedPtrDeleter);
|
| - static void deletePtr(T* ptr)
|
| - {
|
| - static_assert(!IsRefCounted<T>::value, "use RefPtr for RefCounted objects");
|
| - static_assert(sizeof(T) > 0, "type must be complete");
|
| - delete[] ptr;
|
| - }
|
| + STATIC_ONLY(OwnedPtrDeleter);
|
| + static void deletePtr(T* ptr) {
|
| + static_assert(!IsRefCounted<T>::value, "use RefPtr for RefCounted objects");
|
| + static_assert(sizeof(T) > 0, "type must be complete");
|
| + delete[] ptr;
|
| + }
|
| };
|
|
|
| template <class T, int n>
|
| struct OwnedPtrDeleter<T[n]> {
|
| - STATIC_ONLY(OwnedPtrDeleter);
|
| - static_assert(sizeof(T) < 0, "do not use array with size as type");
|
| + STATIC_ONLY(OwnedPtrDeleter);
|
| + static_assert(sizeof(T) < 0, "do not use array with size as type");
|
| };
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| -#endif // WTF_OwnPtrCommon_h
|
| +#endif // WTF_OwnPtrCommon_h
|
|
|