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

Unified Diff: base/metrics/persistent_memory_allocator.h

Issue 2670873002: Remove base's ALIGNOF/ALIGNAS in favor of alignof/alignas. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « base/memory/singleton_unittest.cc ('k') | base/process/launch_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_memory_allocator.h
diff --git a/base/metrics/persistent_memory_allocator.h b/base/metrics/persistent_memory_allocator.h
index e0ac867578ab47def39781c66c8b3bcc7a8c2f85..e9733e6f5f62bdc88f967a67f6a03d03213b7ee6 100644
--- a/base/metrics/persistent_memory_allocator.h
+++ b/base/metrics/persistent_memory_allocator.h
@@ -470,7 +470,7 @@ class BASE_EXPORT PersistentMemoryAllocator {
const_cast<void*>(GetBlockData(ref, T::kPersistentTypeId, size));
if (!mem)
return nullptr;
- DCHECK_EQ(0U, reinterpret_cast<uintptr_t>(mem) & (ALIGNOF(T) - 1));
+ DCHECK_EQ(0U, reinterpret_cast<uintptr_t>(mem) & (alignof(T) - 1));
return new (mem) T();
}
template <typename T>
@@ -498,7 +498,7 @@ class BASE_EXPORT PersistentMemoryAllocator {
return nullptr;
// Ensure the allocator's internal alignment is sufficient for this object.
// This protects against coding errors in the allocator.
- DCHECK_EQ(0U, reinterpret_cast<uintptr_t>(mem) & (ALIGNOF(T) - 1));
+ DCHECK_EQ(0U, reinterpret_cast<uintptr_t>(mem) & (alignof(T) - 1));
// Change the type, clearing the memory if so desired. The new type is
// "transitioning" so that there is no race condition with the construction
// of the object should another thread be simultaneously iterating over
« no previous file with comments | « base/memory/singleton_unittest.cc ('k') | base/process/launch_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698