Add an explicit cast for an integral promotion that MSVC warns about.

I don't think the warning is valid, but it's a good sign that MSVC is
fixin' to generate the wrong code no matter what I think.

R=ricow@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7869008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c0491e71
......@@ -213,7 +213,7 @@ class BitField {
// Tells whether the provided value fits into the bit field.
static bool is_valid(T value) {
return (static_cast<uint32_t>(value) & ~kMax) == 0;
return (static_cast<uint32_t>(value) & ~static_cast<uint32_t>(kMax)) == 0;
}
// Returns a uint32_t with the bit field value encoded.
......
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