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

Unified Diff: util/stdlib/string_number_conversion.cc

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 | « util/misc/symbolic_constants_common.h ('k') | util/test/posix/close_multiple.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/stdlib/string_number_conversion.cc
diff --git a/util/stdlib/string_number_conversion.cc b/util/stdlib/string_number_conversion.cc
index 0c16c0386cc31143eaee706661c825c061834c34..a7c7d519dedfb22bb9332af7685325919fdea42b 100644
--- a/util/stdlib/string_number_conversion.cc
+++ b/util/stdlib/string_number_conversion.cc
@@ -40,8 +40,8 @@ namespace {
template <typename TIntType, typename TLongType>
struct StringToIntegerTraits {
- typedef TIntType IntType;
- typedef TLongType LongType;
+ using IntType = TIntType;
+ using LongType = TLongType;
static void TypeCheck() {
static_assert(std::numeric_limits<TIntType>::is_integer &&
std::numeric_limits<TLongType>::is_integer,
@@ -75,7 +75,7 @@ struct StringToSignedIntegerTraits
}
private:
- typedef StringToIntegerTraits<TIntType, TLongType> super;
+ using super = StringToIntegerTraits<TIntType, TLongType>;
};
template <typename TIntType, typename TLongType>
@@ -89,7 +89,7 @@ struct StringToUnsignedIntegerTraits
static bool IsNegativeOverflow(TLongType value) { return false; }
private:
- typedef StringToIntegerTraits<TIntType, TLongType> super;
+ using super = StringToIntegerTraits<TIntType, TLongType>;
};
struct StringToIntTraits : public StringToSignedIntegerTraits<int, long> {
@@ -111,8 +111,8 @@ struct StringToUnsignedIntTraits
template <typename Traits>
bool StringToIntegerInternal(const base::StringPiece& string,
typename Traits::IntType* number) {
- typedef typename Traits::IntType IntType;
- typedef typename Traits::LongType LongType;
+ using IntType = typename Traits::IntType;
+ using LongType = typename Traits::LongType;
Traits::TypeCheck();
« no previous file with comments | « util/misc/symbolic_constants_common.h ('k') | util/test/posix/close_multiple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698