summaryrefslogtreecommitdiffstats
path: root/include/basebmp/polypolygonrenderer.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-08-29 13:30:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-08-29 13:31:22 +0200
commit616197d8077fa3936b609a41557036184d45367d (patch)
tree770941bb2f9dcf87bc792a69bbdbec088a749371 /include/basebmp/polypolygonrenderer.hxx
parentmake the tinderbox information more reliable in the about dialog (fdo#58034) (diff)
downloadcore-616197d8077fa3936b609a41557036184d45367d.tar.gz
core-616197d8077fa3936b609a41557036184d45367d.zip
left shift of negative values (Clang -fsanitize=undefined)
Change-Id: I1747959bd51f066b017cbf5d161ebe37f3df02e6
Diffstat (limited to 'include/basebmp/polypolygonrenderer.hxx')
-rw-r--r--include/basebmp/polypolygonrenderer.hxx2
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)