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

Unified Diff: public/platform/WebPrivatePtr.h

Issue 802633005: replace COMPILE_ASSERT with static_assert in public/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: improve static_assert msgs 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 | « public/platform/WebPrivateOwnPtr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebPrivatePtr.h
diff --git a/public/platform/WebPrivatePtr.h b/public/platform/WebPrivatePtr.h
index 360f646d876582ef2c3c315f33f42a21adfb5735..07b84db35c5dccc9f6e46def38fbe1f358cb8d75 100644
--- a/public/platform/WebPrivatePtr.h
+++ b/public/platform/WebPrivatePtr.h
@@ -138,13 +138,13 @@ class PtrStorage : public PtrStorageImpl<T, LifetimeOf<T>::value> {
public:
static PtrStorage& fromSlot(void** slot)
{
- COMPILE_ASSERT(sizeof(PtrStorage) == sizeof(void*), PtrStorage_must_be_pointer_size);
+ static_assert(sizeof(PtrStorage) == sizeof(void*), "PtrStorage must be the size of a pointer");
return *reinterpret_cast<PtrStorage*>(slot);
}
static const PtrStorage& fromSlot(void* const* slot)
{
- COMPILE_ASSERT(sizeof(PtrStorage) == sizeof(void*), PtrStorage_must_be_pointer_size);
+ static_assert(sizeof(PtrStorage) == sizeof(void*), "PtrStorage must be the size of a pointer");
return *reinterpret_cast<const PtrStorage*>(slot);
}
« no previous file with comments | « public/platform/WebPrivateOwnPtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698