Index: base/callback_internal.h |
diff --git a/base/callback_internal.h b/base/callback_internal.h |
index a2adbf914bb64e589dfe3ee4afcd4783dea75b16..d1d8ab8ec659265f2b7f19cce493baf630aa9ad3 100644 |
--- a/base/callback_internal.h |
+++ b/base/callback_internal.h |
@@ -73,7 +73,7 @@ class BASE_EXPORT CallbackBase { |
// another type. It is not okay to use void*. We create a InvokeFuncStorage |
// that that can store our function pointer, and then cast it back to |
// the original type on usage. |
- typedef void(*InvokeFuncStorage)(void); |
+ using InvokeFuncStorage = void(*)(); |
// Returns true if this callback equals |other|. |other| may be null. |
bool Equals(const CallbackBase& other) const; |
@@ -148,8 +148,8 @@ struct CallbackParamTraits |
template <typename T> |
struct CallbackParamTraitsForNonMoveOnlyType { |
- typedef const T& ForwardType; |
- typedef T StorageType; |
+ using ForwardType = const T&; |
+ using StorageType = T; |
}; |
// The Storage should almost be impossible to trigger unless someone manually |
@@ -159,8 +159,8 @@ struct CallbackParamTraitsForNonMoveOnlyType { |
// The ForwardType should only be used for unbound arguments. |
template <typename T> |
struct CallbackParamTraitsForNonMoveOnlyType<T&> { |
- typedef T& ForwardType; |
- typedef T StorageType; |
+ using ForwardType = T&; |
+ using StorageType = T; |
}; |
// Note that for array types, we implicitly add a const in the conversion. This |
@@ -170,15 +170,15 @@ struct CallbackParamTraitsForNonMoveOnlyType<T&> { |
// restriction. |
template <typename T, size_t n> |
struct CallbackParamTraitsForNonMoveOnlyType<T[n]> { |
- typedef const T* ForwardType; |
- typedef const T* StorageType; |
+ using ForwardType = const T*; |
+ using StorageType = const T*; |
}; |
// See comment for CallbackParamTraits<T[n]>. |
template <typename T> |
struct CallbackParamTraitsForNonMoveOnlyType<T[]> { |
- typedef const T* ForwardType; |
- typedef const T* StorageType; |
+ using ForwardType = const T*; |
+ using StorageType = const T*; |
}; |
// Parameter traits for movable-but-not-copyable scopers. |
@@ -196,8 +196,8 @@ struct CallbackParamTraitsForNonMoveOnlyType<T[]> { |
// function or a cast would not be usable with Callback<> or Bind(). |
template <typename T> |
struct CallbackParamTraitsForMoveOnlyType { |
- typedef T ForwardType; |
- typedef T StorageType; |
+ using ForwardType = T; |
+ using StorageType = T; |
}; |
// CallbackForward() is a very limited simulation of C++11's std::forward() |