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

Unified Diff: net/http2/tools/random_decoder_test.h

Issue 2797793002: Remove base::underlying_type, replace uses with std::underlying_type (Closed)
Patch Set: underlyingtype: rm-tests Created 3 years, 8 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
« no previous file with comments | « net/http2/http2_structures_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http2/tools/random_decoder_test.h
diff --git a/net/http2/tools/random_decoder_test.h b/net/http2/tools/random_decoder_test.h
index 5cb10f647fe65a4aaab0c04e0e8477c90fc803b1..ea61dc7f9209edaa56c1dcf8f6c24dcca29cce55 100644
--- a/net/http2/tools/random_decoder_test.h
+++ b/net/http2/tools/random_decoder_test.h
@@ -19,7 +19,6 @@
#include "base/logging.h"
#include "base/strings/string_piece.h"
-#include "base/template_util.h"
#include "net/http2/decoder/decode_buffer.h"
#include "net/http2/decoder/decode_status.h"
#include "net/http2/tools/failure.h"
@@ -49,9 +48,9 @@ void CorruptEnum(T* out, RandomBase* rng) {
// resulting value is the smallest unsigned value equal to the source value
// modulo 2^n, where n is the number of bits used to represent the
// destination type unsigned U.
- typedef typename base::underlying_type<T>::type underlying_type_T;
- typedef typename std::make_unsigned<underlying_type_T>::type
- unsigned_underlying_type_T;
+ using underlying_type_T = typename std::underlying_type<T>::type;
+ using unsigned_underlying_type_T =
+ typename std::make_unsigned<underlying_type_T>::type;
auto r = static_cast<unsigned_underlying_type_T>(rng->Rand32());
*out = static_cast<T>(r);
}
« no previous file with comments | « net/http2/http2_structures_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698