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

Unified Diff: mojo/edk/system/memory.h

Issue 1154903003: "typedef Foo Bar" -> "using Bar = Foo" in //mojo/edk/.... (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
Index: mojo/edk/system/memory.h
diff --git a/mojo/edk/system/memory.h b/mojo/edk/system/memory.h
index 96cf2199d00ca21d7d713139eed3c3f29afa6b53..2f1bde450e1e36e39c2aa9d4858f6ce66b19ed32 100644
--- a/mojo/edk/system/memory.h
+++ b/mojo/edk/system/memory.h
@@ -23,25 +23,25 @@ namespace internal {
// TODO(vtl): Remove these once we have the C++11 |remove_const|.
template <typename T>
struct remove_const {
- typedef T type;
+ using type = T;
};
template <typename T>
struct remove_const<const T> {
- typedef T type;
+ using type = T;
};
// Yields |(const) char| if |T| is |(const) void|, else |T|:
template <typename T>
struct VoidToChar {
- typedef T type;
+ using type = T;
};
template <>
struct VoidToChar<void> {
- typedef char type;
+ using type = char;
};
template <>
struct VoidToChar<const void> {
- typedef const char type;
+ using type = const char;
};
// Checks (insofar as appropriate/possible) that |pointer| is a valid pointer to
@@ -84,7 +84,7 @@ struct NullUserPointer {};
template <typename Type>
class UserPointer {
private:
- typedef typename internal::VoidToChar<Type>::type NonVoidType;
+ using NonVoidType = typename internal::VoidToChar<Type>::type;
public:
// Instead of explicitly using these constructors, you can often use
@@ -243,9 +243,9 @@ class UserPointer {
//
// TODO(vtl): Possibly, since we're not really being safe, we should just not
// copy for Release builds.
- typedef UserPointerReader<Type> Reader;
- typedef UserPointerWriter<Type> Writer;
- typedef UserPointerReaderWriter<Type> ReaderWriter;
+ using Reader = UserPointerReader<Type>;
+ using Writer = UserPointerWriter<Type>;
+ using ReaderWriter = UserPointerReaderWriter<Type>;
private:
friend class UserPointerReader<Type>;
@@ -269,7 +269,7 @@ inline UserPointer<Type> MakeUserPointer(Type* pointer) {
template <typename Type>
class UserPointerReader {
private:
- typedef typename internal::remove_const<Type>::type TypeNoConst;
+ using TypeNoConst = typename internal::remove_const<Type>::type;
public:
// Note: If |count| is zero, |GetPointer()| will always return null.

Powered by Google App Engine
This is Rietveld 408576698