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

Unified Diff: net/base/mime_sniffer_perftest.cc

Issue 1858423002: Fix C4334 (32-bit shift converted to 64-bit) warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comment, enable for gyp also Created 4 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 | « media/filters/vp8_parser.cc ('k') | net/spdy/hpack/hpack_huffman_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_sniffer_perftest.cc
diff --git a/net/base/mime_sniffer_perftest.cc b/net/base/mime_sniffer_perftest.cc
index 72ff0dc1ad8ff69467d661c9efe5417ca1c0fba5..be81ef7b653655fb59067d45d32ee65284f9fb6b 100644
--- a/net/base/mime_sniffer_perftest.cc
+++ b/net/base/mime_sniffer_perftest.cc
@@ -88,9 +88,8 @@ TEST(MimeSnifferTest, PlainTextPerfTest) {
// The purpose of the static_cast<size_t>() here is to prevent MSVC from
// complaining about an implicit promotion to 64 bits when compiling 64-bit.
asanka 2016/04/06 02:05:56 Nit: obsolete?
brucedawson 2016/04/06 17:53:42 Good catch. Done.
size_t expected_size =
- plaintext.size() *
- static_cast<size_t>(
- 1u << base::bits::Log2Ceiling(kTargetSize / plaintext.size()));
+ plaintext.size() * static_cast<size_t>(1)
asanka 2016/04/06 02:05:57 Nit: Can we get rid of the "* static_cast<size_t>(
brucedawson 2016/04/06 17:53:42 Hey, good point. That's quite weird, and unnecessa
+ << base::bits::Log2Ceiling(kTargetSize / plaintext.size());
plaintext.reserve(expected_size);
while (plaintext.size() < kTargetSize)
plaintext += plaintext;
« no previous file with comments | « media/filters/vp8_parser.cc ('k') | net/spdy/hpack/hpack_huffman_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698