Index: base/containers/stack_container_unittest.cc |
diff --git a/base/containers/stack_container_unittest.cc b/base/containers/stack_container_unittest.cc |
index 05c733a4a79b4e0f63d9852955877c59dcfbd377..2bb95379ba1f7c9f1c960936ee6ddf477a0e3ddd 100644 |
--- a/base/containers/stack_container_unittest.cc |
+++ b/base/containers/stack_container_unittest.cc |
@@ -8,7 +8,6 @@ |
#include <algorithm> |
-#include "base/memory/aligned_memory.h" |
#include "base/memory/ref_counted.h" |
#include "build/build_config.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -107,9 +106,9 @@ namespace { |
template <size_t alignment> |
class AlignedData { |
public: |
- AlignedData() { memset(data_.void_data(), 0, alignment); } |
+ AlignedData() { memset(data_, 0, alignment); } |
~AlignedData() {} |
- base::AlignedMemory<alignment, alignment> data_; |
+ alignas(alignment) char data_[alignment]; |
}; |
} // anonymous namespace |
@@ -120,11 +119,11 @@ class AlignedData { |
TEST(StackContainer, BufferAlignment) { |
StackVector<wchar_t, 16> text; |
text->push_back(L'A'); |
- EXPECT_ALIGNED(&text[0], ALIGNOF(wchar_t)); |
+ EXPECT_ALIGNED(&text[0], alignof(wchar_t)); |
StackVector<double, 1> doubles; |
doubles->push_back(0.0); |
- EXPECT_ALIGNED(&doubles[0], ALIGNOF(double)); |
+ EXPECT_ALIGNED(&doubles[0], alignof(double)); |
StackVector<AlignedData<16>, 1> aligned16; |
aligned16->push_back(AlignedData<16>()); |