diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-29 13:30:44 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-29 13:31:22 +0200 |
commit | 616197d8077fa3936b609a41557036184d45367d (patch) | |
tree | 770941bb2f9dcf87bc792a69bbdbec088a749371 /include/basebmp/polypolygonrenderer.hxx | |
parent | 28cc89aad16e8ea3c9eec7f45749c1cfaaf1d7af (diff) |
left shift of negative values (Clang -fsanitize=undefined)
Change-Id: I1747959bd51f066b017cbf5d161ebe37f3df02e6
Diffstat (limited to 'include/basebmp/polypolygonrenderer.hxx')
-rw-r--r-- | include/basebmp/polypolygonrenderer.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/basebmp/polypolygonrenderer.hxx b/include/basebmp/polypolygonrenderer.hxx index 80f73ac01279..09bd18adc493 100644 --- a/include/basebmp/polypolygonrenderer.hxx +++ b/include/basebmp/polypolygonrenderer.hxx @@ -39,7 +39,7 @@ namespace basebmp namespace detail { /// convert int32 to 32:32 fixed point - inline sal_Int64 toFractional( sal_Int32 v ) { return (sal_Int64)v << 32; } + inline sal_Int64 toFractional( sal_Int32 v ) { return sal_Int64(sal_uInt64(v) << 32); } /// convert double to 32:32 fixed point inline sal_Int64 toFractional( double v ) { return (sal_Int64)(v*SAL_MAX_UINT32 + (v < 0.0 ? -0.5 : 0.5 )); } /// convert 32:32 fixed point to int32 (truncate) |