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

Unified Diff: base/bind.h

Issue 1537553002: Replace typedef with using for Callback/Bind related files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 | « no previous file | base/bind_helpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind.h
diff --git a/base/bind.h b/base/bind.h
index 4c2abed7e71c7d6efc1ab14d24d3d7f82c69ecab..770e45706b02da7a041f4415bbd387f47f50e1e4 100644
--- a/base/bind.h
+++ b/base/bind.h
@@ -55,14 +55,14 @@ base::Callback<
typename internal::CallbackParamTraits<Args>::StorageType...>
::UnboundRunType>
Bind(Functor functor, const Args&... args) {
- // Typedefs for how to store and run the functor.
- typedef typename internal::FunctorTraits<Functor>::RunnableType RunnableType;
- typedef typename internal::FunctorTraits<Functor>::RunType RunType;
+ // Type aliases for how to store and run the functor.
+ using RunnableType = typename internal::FunctorTraits<Functor>::RunnableType;
+ using RunType = typename internal::FunctorTraits<Functor>::RunType;
// Use RunnableType::RunType instead of RunType above because our
- // checks should below for bound references need to know what the actual
+ // checks below for bound references need to know what the actual
// functor is going to interpret the argument as.
- typedef typename RunnableType::RunType BoundRunType;
+ using BoundRunType = typename RunnableType::RunType;
using BoundArgs =
internal::TakeTypeListItem<sizeof...(Args),
@@ -88,10 +88,9 @@ Bind(Functor functor, const Args&... args) {
!internal::HasRefCountedParamAsRawPtr<is_method, Args...>::value,
"a parameter is a refcounted type and needs scoped_refptr");
- typedef internal::BindState<
+ using BindState = internal::BindState<
RunnableType, RunType,
- typename internal::CallbackParamTraits<Args>::StorageType...>
- BindState;
+ typename internal::CallbackParamTraits<Args>::StorageType...>;
return Callback<typename BindState::UnboundRunType>(
new BindState(internal::MakeRunnable(functor), args...));
« no previous file with comments | « no previous file | base/bind_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698