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

Unified Diff: gpu/command_buffer/common/id_allocator.cc

Issue 1468803002: Switch to static_assert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert1
Patch Set: message cleanup Created 5 years, 1 month 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
Index: gpu/command_buffer/common/id_allocator.cc
diff --git a/gpu/command_buffer/common/id_allocator.cc b/gpu/command_buffer/common/id_allocator.cc
index eccb4681df72bced7aa00d1ac01d59931b0429d1..80e109aa744f122811ffa9f15a1ad438b1726c6d 100644
--- a/gpu/command_buffer/common/id_allocator.cc
+++ b/gpu/command_buffer/common/id_allocator.cc
@@ -12,7 +12,7 @@
namespace gpu {
IdAllocator::IdAllocator() {
- COMPILE_ASSERT(kInvalidResource == 0u, invalid_resource_is_not_zero);
+ static_assert(kInvalidResource == 0u, "kInvalidResource must be 0");
// Simplify the code by making sure that lower_bound(id) never
// returns the beginning of the map, if id is valid (eg !=
// kInvalidResource).
@@ -143,7 +143,7 @@ void IdAllocator::FreeID(ResourceId id) {
}
void IdAllocator::FreeIDRange(ResourceId first_id, uint32 range) {
- COMPILE_ASSERT(kInvalidResource == 0u, invalid_resource_is_not_zero);
+ static_assert(kInvalidResource == 0u, "kInvalidResource must be 0");
if (range == 0u || (first_id == 0u && range == 1u)) {
return;
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | ios/web/navigation/crw_session_certificate_policy_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698