brucedawson d81dc49c5b Fix C4434 warning about 32-bit shift assigned to 64-bits
VS 2015 has a new or louder warning about 32-bit shifts that are then
assigned to a 64-bit target. This type of code triggers it:

int64_t size = 1 << shift_amount;

Because the '1' being shifted is a 32-bit int the result of the shift
will be a 32-bit result, so assigning it to a 64-bit variable is just
misleading.

In this case the code that triggers it is this:

  size_t window_size = static_cast<size_t>(1 << shift_amount);

The destination is a size_t so the warning only shows up on 64-bit
builds and doesn't indicate a real bug. It's curious that the code
had a cast already - presumably to suppress some other warning - but
the cast is not in the ideal place and doesn't avoid this new warning.
Moving the cast allows shift_amount to be log2(size_t) and allows
enabling C4334 in Chromium.

BUG=593448

Review URL: https://codereview.webrtc.org/1849753004

Cr-Commit-Position: refs/heads/master@{#12199}
2016-04-01 17:16:21 +00:00
..
2016-03-24 21:36:33 +00:00
2016-03-31 17:24:31 +00:00
2016-03-31 17:24:31 +00:00
2016-03-31 17:24:31 +00:00
2016-03-24 21:36:33 +00:00
2016-01-13 00:26:55 +00:00
2016-03-24 08:51:59 +00:00
2016-03-31 17:24:31 +00:00