From 706f6212c60dd8861a0ae922a77c455a08360aa3 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Mon, 14 May 2012 17:51:23 +0000 Subject: Fixes for Windows Release compiler complaints (overflow in const arith) http://codereview.appspot.com/6210056/ git-svn-id: http://skia.googlecode.com/svn/trunk@3926 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/animator/SkDisplayNumber.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/animator/SkDisplayNumber.cpp') diff --git a/src/animator/SkDisplayNumber.cpp b/src/animator/SkDisplayNumber.cpp index 282dab6ad5..ed24ce861c 100644 --- a/src/animator/SkDisplayNumber.cpp +++ b/src/animator/SkDisplayNumber.cpp @@ -31,6 +31,13 @@ const SkMemberInfo SkDisplayNumber::fInfo[] = { DEFINE_GET_MEMBER(SkDisplayNumber); +#if defined _WIN32 +#pragma warning ( push ) +// we are intentionally causing an overflow here +// (warning C4756: overflow in constant arithmetic) +#pragma warning ( disable : 4756 ) +#endif + bool SkDisplayNumber::getProperty(int index, SkScriptValue* value) const { SkScalar constant; switch (index) { @@ -57,3 +64,7 @@ bool SkDisplayNumber::getProperty(int index, SkScriptValue* value) const { value->fType = SkType_Float; return true; } + +#if defined _WIN32 +#pragma warning ( pop ) +#endif \ No newline at end of file -- cgit v1.2.3