aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/TextBlobBench.cpp
diff options
context:
space:
mode:
authorGravatar brucedawson <brucedawson@chromium.org>2016-03-31 05:53:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-31 05:53:44 -0700
commitcce19c821ce0a76886078c6df24fba57fd2f12de (patch)
tree116fee35a6ea805fa39c8cd107cf784c65396273 /bench/TextBlobBench.cpp
parent142659c76dfca1e0a34eb6a022329b73b6ba3166 (diff)
Fix C4334 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 alloc = 1<<fLgSize++; The destination is a size_t so the warning only shows up on 64-bit builds and doesn't indicate a real bug. But, casting the '1' constant to size_t makes the behavior/intent more obvious and consistent and allows enabling C4334 in Chromium. BUG=593448 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845123002 Review URL: https://codereview.chromium.org/1845123002
Diffstat (limited to 'bench/TextBlobBench.cpp')
0 files changed, 0 insertions, 0 deletions