diff options
author | anujk.sharma <anujk.sharma@samsung.com> | 2015-01-21 12:39:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-21 20:39:57 +0000 |
commit | ceeb4976a531646f84d4c37d0ac4abcaccc74c22 (patch) | |
tree | a5bb354bb2cabdaa965ef13c2fd2511fd6caf81d /google_apis/gcm | |
parent | afbf7f097f96b0de047768d70381a5494fab26ff (diff) | |
download | chromium_src-ceeb4976a531646f84d4c37d0ac4abcaccc74c22.zip chromium_src-ceeb4976a531646f84d4c37d0ac4abcaccc74c22.tar.gz chromium_src-ceeb4976a531646f84d4c37d0ac4abcaccc74c22.tar.bz2 |
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}
Diffstat (limited to 'google_apis/gcm')
-rw-r--r-- | google_apis/gcm/base/mcs_util.cc | 4 | ||||
-rw-r--r-- | google_apis/gcm/base/mcs_util_unittest.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/google_apis/gcm/base/mcs_util.cc b/google_apis/gcm/base/mcs_util.cc index ceccc95..7dd9d7b 100644 --- a/google_apis/gcm/base/mcs_util.cc +++ b/google_apis/gcm/base/mcs_util.cc @@ -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"; diff --git a/google_apis/gcm/base/mcs_util_unittest.cc b/google_apis/gcm/base/mcs_util_unittest.cc index 00bac11..d51f5a07 100644 --- a/google_apis/gcm/base/mcs_util_unittest.cc +++ b/google_apis/gcm/base/mcs_util_unittest.cc @@ -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, |