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

Unified Diff: ppapi/proxy/ppapi_message_utils.h

Issue 824153003: replace COMPILE_ASSERT with static_assert in ppapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 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 | « ppapi/proxy/interface_list.cc ('k') | ppapi/shared_impl/id_assignment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_message_utils.h
diff --git a/ppapi/proxy/ppapi_message_utils.h b/ppapi/proxy/ppapi_message_utils.h
index 38f623a9f5e3d19904976f668aec9a43bd4ed981..7c4fc0ce7d1b632d4676b314b16609bee01186e2 100644
--- a/ppapi/proxy/ppapi_message_utils.h
+++ b/ppapi/proxy/ppapi_message_utils.h
@@ -67,9 +67,9 @@ struct TupleTypeMatch5<Tuple<A, B, C, D, E>, A, B, C, D, E> {
template <class MsgClass, class A>
bool UnpackMessage(const IPC::Message& msg, A* a) {
- COMPILE_ASSERT(
+ static_assert(
(internal::TupleTypeMatch1<typename MsgClass::Param, A>::kValue),
- tuple_types_dont_match);
+ "tuple types should match");
PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a);
@@ -77,9 +77,9 @@ bool UnpackMessage(const IPC::Message& msg, A* a) {
template <class MsgClass, class A, class B>
bool UnpackMessage(const IPC::Message& msg, A* a, B* b) {
- COMPILE_ASSERT(
+ static_assert(
(internal::TupleTypeMatch2<typename MsgClass::Param, A, B>::kValue),
- tuple_types_dont_match);
+ "tuple types should match");
PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) && IPC::ReadParam(&msg, &iter, b);
@@ -87,9 +87,9 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b) {
template <class MsgClass, class A, class B, class C>
bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c) {
- COMPILE_ASSERT(
+ static_assert(
(internal::TupleTypeMatch3<typename MsgClass::Param, A, B, C>::kValue),
- tuple_types_dont_match);
+ "tuple types should match");
PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) &&
@@ -99,9 +99,9 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c) {
template <class MsgClass, class A, class B, class C, class D>
bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c, D* d) {
- COMPILE_ASSERT(
+ static_assert(
(internal::TupleTypeMatch4<typename MsgClass::Param, A, B, C, D>::kValue),
- tuple_types_dont_match);
+ "tuple types should match");
PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) &&
@@ -112,10 +112,10 @@ bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c, D* d) {
template <class MsgClass, class A, class B, class C, class D, class E>
bool UnpackMessage(const IPC::Message& msg, A* a, B* b, C* c, D* d, E* e) {
- COMPILE_ASSERT(
+ static_assert(
(internal::TupleTypeMatch5<
typename MsgClass::Param, A, B, C, D, E>::kValue),
- tuple_types_dont_match);
+ "tuple types should match");
PickleIterator iter(msg);
return IPC::ReadParam(&msg, &iter, a) &&
« no previous file with comments | « ppapi/proxy/interface_list.cc ('k') | ppapi/shared_impl/id_assignment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698