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

Unified Diff: third_party/WebKit/Source/wtf/OwnPtrCommon.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/OwnPtr.h ('k') | third_party/WebKit/Source/wtf/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/wtf/OwnPtr.h ('k') | third_party/WebKit/Source/wtf/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698