From: kmillikin@chromium.org Date: Mon, 12 Sep 2011 12:16:30 +0000 (+0000) Subject: Add an explicit cast for an integral promotion that MSVC warns about. X-Git-Tag: upstream/4.7.83~18498 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ebe8039ac58eb7e1d668b67468a2d807caf32fe;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/src/utils.h b/src/utils.h index 852a6ae..26c522b 100644 --- a/src/utils.h +++ b/src/utils.h @@ -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(value) & ~kMax) == 0; + return (static_cast(value) & ~static_cast(kMax)) == 0; } // Returns a uint32_t with the bit field value encoded.