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

Side by Side Diff: snapshot/mac/process_types/traits.h

Issue 700143004: C++11: Use type aliases instead of typedefs (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « snapshot/mac/process_types.cc ('k') | util/file/fd_io.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 // This file is intended to be included multiple times in the same translation 15 // This file is intended to be included multiple times in the same translation
16 // unit, so #include guards are intentionally absent. 16 // unit, so #include guards are intentionally absent.
17 // 17 //
18 // This file is included by snapshot/mac/process_types.h and 18 // This file is included by snapshot/mac/process_types.h and
19 // snapshot/mac/process_types/internal.h to produce traits class definitions. 19 // snapshot/mac/process_types/internal.h to produce traits class definitions.
20 20
21 // Things that #include this file should #undef 21 // Things that #include this file should #undef
22 // DECLARE_PROCESS_TYPE_TRAITS_CLASS before #including this file again and after 22 // DECLARE_PROCESS_TYPE_TRAITS_CLASS before #including this file again and after
23 // the last #include of this file. 23 // the last #include of this file.
24 // 24 //
25 // |Reserved| is used for padding fields that may be zero-length, and thus 25 // |Reserved| is used for padding fields that may be zero-length, and thus
26 // __VA_ARGS__, which is intended to set the alignment of the 64-bit types, is 26 // __VA_ARGS__, which is intended to set the alignment of the 64-bit types, is
27 // not used for that typedef. 27 // not used for that type alias.
28 #define DECLARE_PROCESS_TYPE_TRAITS_CLASS(traits_name, lp_bits, ...) \ 28 #define DECLARE_PROCESS_TYPE_TRAITS_CLASS(traits_name, lp_bits, ...) \
29 namespace crashpad { \ 29 namespace crashpad { \
30 namespace process_types { \ 30 namespace process_types { \
31 namespace internal { \ 31 namespace internal { \
32 struct Traits##traits_name { \ 32 struct Traits##traits_name { \
33 typedef int##lp_bits##_t Long __VA_ARGS__; \ 33 using Long = int##lp_bits##_t __VA_ARGS__; \
34 typedef uint##lp_bits##_t ULong __VA_ARGS__; \ 34 using ULong = uint##lp_bits##_t __VA_ARGS__; \
35 typedef uint##lp_bits##_t Pointer __VA_ARGS__; \ 35 using Pointer = uint##lp_bits##_t __VA_ARGS__; \
36 typedef int##lp_bits##_t IntPtr __VA_ARGS__; \ 36 using IntPtr = int##lp_bits##_t __VA_ARGS__; \
37 typedef uint##lp_bits##_t UIntPtr __VA_ARGS__; \ 37 using UIntPtr = uint##lp_bits##_t __VA_ARGS__; \
38 typedef Reserved64Only##lp_bits Reserved64Only; \ 38 using Reserved64Only = Reserved64Only##lp_bits; \
39 }; \ 39 }; \
40 } \ 40 } \
41 } \ 41 } \
42 } 42 }
OLDNEW
« no previous file with comments | « snapshot/mac/process_types.cc ('k') | util/file/fd_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698