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

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: Removing obsolete comment and pointless '1' 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..a25add185860b659d411c9b8b1604ea0f55f02bb 100644
--- a/net/base/mime_sniffer_perftest.cc
+++ b/net/base/mime_sniffer_perftest.cc
@@ -85,12 +85,8 @@ TEST(MimeSnifferTest, PlainTextPerfTest) {
const size_t kWarmupIterations = 16;
const size_t kMeasuredIterations = 1 << 15;
std::string plaintext = kRepresentativePlainText;
- // 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.
- size_t expected_size =
- plaintext.size() *
- static_cast<size_t>(
- 1u << base::bits::Log2Ceiling(kTargetSize / plaintext.size()));
+ size_t expected_size = plaintext.size() << 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