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

Unified Diff: snapshot/mac/process_types.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/mac/process_reader_test.cc ('k') | snapshot/mac/process_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/mac/process_types.h
diff --git a/snapshot/mac/process_types.h b/snapshot/mac/process_types.h
index 4915169b9c38fdc545a439a026773946427e3b6a..b38fea789c4669334fd206ba8ce22c343c167bcd 100644
--- a/snapshot/mac/process_types.h
+++ b/snapshot/mac/process_types.h
@@ -31,8 +31,8 @@ namespace internal {
// additional “reserved” padding fields present only in the 64-bit environment.
// These Reserved64Only* types allow the process_types system to replicate these
// structures more precisely.
-typedef char Reserved64Only32[0];
-typedef uint32_t Reserved64Only64;
+using Reserved64Only32 = char[0];
+using Reserved64Only64 = uint32_t;
} // namespace internal
} // namespace process_types
@@ -56,12 +56,12 @@ DECLARE_PROCESS_TYPE_TRAITS_CLASS(Generic, 64)
namespace process_types { \
struct struct_name { \
public: \
- typedef internal::TraitsGeneric::Long Long; \
- typedef internal::TraitsGeneric::ULong ULong; \
- typedef internal::TraitsGeneric::Pointer Pointer; \
- typedef internal::TraitsGeneric::IntPtr IntPtr; \
- typedef internal::TraitsGeneric::UIntPtr UIntPtr; \
- typedef internal::TraitsGeneric::Reserved64Only Reserved64Only; \
+ using Long = internal::TraitsGeneric::Long; \
+ using ULong = internal::TraitsGeneric::ULong; \
+ using Pointer = internal::TraitsGeneric::Pointer; \
+ using IntPtr = internal::TraitsGeneric::IntPtr; \
+ using UIntPtr = internal::TraitsGeneric::UIntPtr; \
+ using Reserved64Only = internal::TraitsGeneric::Reserved64Only; \
\
/* Initializes an object with data read from |process_reader| at \
* |address|, properly genericized. */ \
@@ -136,12 +136,12 @@ DECLARE_PROCESS_TYPE_TRAITS_CLASS(Generic, 64)
template <typename Traits> \
struct struct_name { \
public: \
- typedef typename Traits::Long Long; \
- typedef typename Traits::ULong ULong; \
- typedef typename Traits::Pointer Pointer; \
- typedef typename Traits::IntPtr IntPtr; \
- typedef typename Traits::UIntPtr UIntPtr; \
- typedef typename Traits::Reserved64Only Reserved64Only; \
+ using Long = typename Traits::Long; \
+ using ULong = typename Traits::ULong; \
+ using Pointer = typename Traits::Pointer; \
+ using IntPtr = typename Traits::IntPtr; \
+ using UIntPtr = typename Traits::UIntPtr; \
+ using Reserved64Only = typename Traits::Reserved64Only; \
\
/* Read(), ReadArrayInto(), and Size() are as in the generic user-visible \
* struct above. */ \
« no previous file with comments | « snapshot/mac/process_reader_test.cc ('k') | snapshot/mac/process_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698