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

Side by Side Diff: net/quic/platform/impl/quic_aligned_impl.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_ALIGNED_IMPL_H_ 5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_ALIGNED_IMPL_H_
6 #define NET_QUIC_PLATFORM_IMPL_QUIC_ALIGNED_IMPL_H_ 6 #define NET_QUIC_PLATFORM_IMPL_QUIC_ALIGNED_IMPL_H_
7 7
8 #ifdef _MSC_VER 8 #ifdef _MSC_VER
9 // MSVC 2013 and prior don't have alignof or aligned(); they have __alignof and 9 // MSVC 2013 and prior don't have alignof or aligned(); they have __alignof and
10 // a __declspec instead. 10 // a __declspec instead.
11 #define QUIC_ALIGN_OF_IMPL __alignof 11 #define QUIC_ALIGN_OF_IMPL __alignof
12 #define QUIC_ALIGNED_IMPL(X) __declspec(align(X)) 12 #define QUIC_ALIGNED_IMPL(X) __declspec(align(X))
13 #else 13 #else
14 #define QUIC_ALIGN_OF_IMPL alignof 14 #define QUIC_ALIGN_OF_IMPL alignof
15 #define QUIC_ALIGNED_IMPL(X) __attribute__((aligned(X))) 15 #define QUIC_ALIGNED_IMPL(X) __attribute__((aligned(X)))
16 #endif // _MSC_VER 16 #endif // _MSC_VER
17 17
18 // TODO(rtenneti): Change the default 64 alignas value (used the default 18 // TODO(rtenneti): Change the default 64 alignas value (used the default
19 // value from CACHELINE_SIZE). 19 // value from CACHELINE_SIZE).
20 #define QUIC_CACHELINE_ALIGNED_IMPL ALIGNAS(64) 20 #define QUIC_CACHELINE_ALIGNED_IMPL alignas(64)
21 21
22 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_ALIGNED_IMPL_H_ 22 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_ALIGNED_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698