Commit 5d90c138 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 3

Don't shift an int left while assigning it to a size_t

Summary:
MSVC gives warnings if you shift a 32-bit value left but then assign it to a 64-bit variable. This just makes it a 64-bit shift instead.
If we really wanted, this doesn't need to be a size_t to begin with, but it already is, so just leave it alone.

Reviewed By: yfeldblum

Differential Revision: D3622935

fbshipit-source-id: 25931e6df644df8a2160aa80fd5de21cd9c06159
parent 84e863f6
...@@ -55,7 +55,7 @@ void addHashBenchmark(const std::string& name) { ...@@ -55,7 +55,7 @@ void addHashBenchmark(const std::string& name) {
static std::deque<std::string> names; static std::deque<std::string> names;
for (size_t i = 0; i < 16; ++i) { for (size_t i = 0; i < 16; ++i) {
size_t k = 1 << i; auto k = size_t(1) << i;
names.emplace_back(folly::sformat("{}: k=2^{}",name, i)); names.emplace_back(folly::sformat("{}: k=2^{}",name, i));
folly::addBenchmark(__FILE__, names.back().c_str(), folly::addBenchmark(__FILE__, names.back().c_str(),
[=] (unsigned iters) { [=] (unsigned iters) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment