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

Unified Diff: Source/platform/JSONValues.cpp

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (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/platform/EventTracer.cpp ('k') | Source/platform/Length.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/JSONValues.cpp
diff --git a/Source/platform/JSONValues.cpp b/Source/platform/JSONValues.cpp
index cd710890cac0b2066f2697b0a2d7656844ca9f7a..a3239e7f07b290bf6cd88bf5bb80ab840a6c099a 100644
--- a/Source/platform/JSONValues.cpp
+++ b/Source/platform/JSONValues.cpp
@@ -265,7 +265,7 @@ JSONObjectBase::~JSONObjectBase()
bool JSONObjectBase::asObject(RefPtr<JSONObject>* output)
{
- COMPILE_ASSERT(sizeof(JSONObject) == sizeof(JSONObjectBase), cannot_cast);
+ static_assert(sizeof(JSONObject) == sizeof(JSONObjectBase), "cannot cast");
*output = static_cast<JSONObject*>(this);
return true;
}
@@ -313,7 +313,7 @@ void JSONObjectBase::setArray(const String& name, PassRefPtr<JSONArray> value)
JSONObject* JSONObjectBase::openAccessors()
{
- COMPILE_ASSERT(sizeof(JSONObject) == sizeof(JSONObjectBase), cannot_cast);
+ static_assert(sizeof(JSONObject) == sizeof(JSONObjectBase), "cannot cast");
return static_cast<JSONObject*>(this);
}
@@ -424,14 +424,14 @@ JSONArrayBase::~JSONArrayBase()
bool JSONArrayBase::asArray(RefPtr<JSONArray>* output)
{
- COMPILE_ASSERT(sizeof(JSONArrayBase) == sizeof(JSONArray), cannot_cast);
+ static_assert(sizeof(JSONArrayBase) == sizeof(JSONArray), "cannot cast");
*output = static_cast<JSONArray*>(this);
return true;
}
PassRefPtr<JSONArray> JSONArrayBase::asArray()
{
- COMPILE_ASSERT(sizeof(JSONArrayBase) == sizeof(JSONArray), cannot_cast);
+ static_assert(sizeof(JSONArrayBase) == sizeof(JSONArray), "cannot cast");
return static_cast<JSONArray*>(this);
}
« no previous file with comments | « Source/platform/EventTracer.cpp ('k') | Source/platform/Length.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698