Adding "static_assert" in lieu of "COMPILE_ASSERT" in google_apis module
All our toolchains support c++'s static_assert now- COMPILE_ASSERT can be removed now. BUG=442514 Review URL: https://codereview.chromium.org/860983003 Cr-Commit-Position: refs/heads/master@{#312436}
This commit is contained in:
google_apis/gcm/base
@ -36,8 +36,8 @@ const char* kProtoNames[] = {
|
||||
"mcs_proto.BindAccountResponse",
|
||||
"mcs_proto.TalkMetadata"
|
||||
};
|
||||
COMPILE_ASSERT(arraysize(kProtoNames) == kNumProtoTypes,
|
||||
ProtoNamesMustIncludeAllTags);
|
||||
static_assert(arraysize(kProtoNames) == kNumProtoTypes,
|
||||
"Proto Names Must Include All Tags");
|
||||
|
||||
const char kLoginId[] = "chrome-";
|
||||
const char kLoginDomain[] = "mcs.android.com";
|
||||
|
@ -42,7 +42,7 @@ TEST(MCSUtilTest, ProtobufToTag) {
|
||||
|
||||
// Test getting and setting persistent ids.
|
||||
TEST(MCSUtilTest, PersistentIds) {
|
||||
COMPILE_ASSERT(kNumProtoTypes == 16U, UpdatePersistentIds);
|
||||
static_assert(kNumProtoTypes == 16U, "Update Persistent Ids");
|
||||
const int kTagsWithPersistentIds[] = {
|
||||
kIqStanzaTag,
|
||||
kDataMessageStanzaTag
|
||||
@ -61,7 +61,7 @@ TEST(MCSUtilTest, PersistentIds) {
|
||||
|
||||
// Test getting and setting stream ids.
|
||||
TEST(MCSUtilTest, StreamIds) {
|
||||
COMPILE_ASSERT(kNumProtoTypes == 16U, UpdateStreamIds);
|
||||
static_assert(kNumProtoTypes == 16U, "Update Stream Ids");
|
||||
const int kTagsWithStreamIds[] = {
|
||||
kIqStanzaTag,
|
||||
kDataMessageStanzaTag,
|
||||
|
Reference in New Issue
Block a user