Index: ppapi/shared_impl/private/net_address_private_impl.cc |
diff --git a/ppapi/shared_impl/private/net_address_private_impl.cc b/ppapi/shared_impl/private/net_address_private_impl.cc |
index 04baf96fda2ccc54a00cee452cc9f2b5d103d095..43df743223fa4c4c6c7035740cfd72d9d5e1673d 100644 |
--- a/ppapi/shared_impl/private/net_address_private_impl.cc |
+++ b/ppapi/shared_impl/private/net_address_private_impl.cc |
@@ -92,14 +92,14 @@ struct NetAddress { |
// that the alignment is the same on both sides of the NaCl proxy, which is |
// important because we serialize and deserialize PP_NetAddress_Private by |
// simply copying the raw bytes. |
-COMPILE_ASSERT(sizeof(NetAddress) == 28, |
- NetAddress_different_for_compiler); |
+static_assert(sizeof(NetAddress) == 28, |
+ "NetAddress different for compiler"); |
// Make sure the storage in |PP_NetAddress_Private| is big enough. (Do it here |
// since the data is opaque elsewhere.) |
-COMPILE_ASSERT(sizeof(reinterpret_cast<PP_NetAddress_Private*>(0)->data) >= |
- sizeof(NetAddress), |
- PP_NetAddress_Private_data_too_small); |
+static_assert(sizeof(reinterpret_cast<PP_NetAddress_Private*>(0)->data) >= |
+ sizeof(NetAddress), |
+ "PP_NetAddress_Private data too small"); |
size_t GetAddressSize(const NetAddress* net_addr) { |
return net_addr->is_ipv6 ? kIPv6AddressSize : kIPv4AddressSize; |
@@ -556,8 +556,8 @@ bool NetAddressPrivateImpl::DescribeNetAddressPrivateAsIPv4Address( |
ipv4_addr->port = ConvertToNetEndian16(net_addr->port); |
- COMPILE_ASSERT(sizeof(ipv4_addr->addr) == kIPv4AddressSize, |
- mismatched_IPv4_address_size); |
+ static_assert(sizeof(ipv4_addr->addr) == kIPv4AddressSize, |
+ "mismatched IPv4 address size"); |
memcpy(ipv4_addr->addr, net_addr->address, kIPv4AddressSize); |
return true; |
@@ -576,8 +576,8 @@ bool NetAddressPrivateImpl::DescribeNetAddressPrivateAsIPv6Address( |
ipv6_addr->port = ConvertToNetEndian16(net_addr->port); |
- COMPILE_ASSERT(sizeof(ipv6_addr->addr) == kIPv6AddressSize, |
- mismatched_IPv6_address_size); |
+ static_assert(sizeof(ipv6_addr->addr) == kIPv6AddressSize, |
+ "mismatched IPv6 address size"); |
memcpy(ipv6_addr->addr, net_addr->address, kIPv6AddressSize); |
return true; |