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

Unified Diff: Source/wtf/PassRefPtr.h

Issue 802203004: replace COMPILE_ASSERT with static assert in wtf/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years 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 | « Source/wtf/PassOwnPtr.h ('k') | Source/wtf/SizeLimits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PassRefPtr.h
diff --git a/Source/wtf/PassRefPtr.h b/Source/wtf/PassRefPtr.h
index 363aaa70b68abe59d204480d8a53f6ade943d89b..9ae81bf1cc91b40aea48c7f606c977a40f6f7359 100644
--- a/Source/wtf/PassRefPtr.h
+++ b/Source/wtf/PassRefPtr.h
@@ -93,7 +93,7 @@ namespace WTF {
enum AdoptRefTag { AdoptRef };
PassRefPtr(T* ptr, AdoptRefTag) : m_ptr(ptr) { }
- PassRefPtr& operator=(const PassRefPtr&) { COMPILE_ASSERT(!sizeof(T*), PassRefPtr_should_never_be_assigned_to); return *this; }
+ PassRefPtr& operator=(const PassRefPtr&) { static_assert(!sizeof(T*), "PassRefPtr should never be assigned to"); return *this; }
mutable T* m_ptr;
};
« no previous file with comments | « Source/wtf/PassOwnPtr.h ('k') | Source/wtf/SizeLimits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698