diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-16 11:40:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-16 20:31:11 +0200 |
commit | 0b4816c33fef67bace8c223034f4340d1c80b441 (patch) | |
tree | a1c8c1ee0d3cb284ee49152bcca636715fafbf55 /canvas/workben | |
parent | 8536d63dc3a65bdf0121a000210a4f92379ce2a0 (diff) |
cid#1448384 Calling risky rand
Change-Id: I4787c004ca73cb3496a33c06c03ea4cd988b72ad
Reviewed-on: https://gerrit.libreoffice.org/75712
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas/workben')
-rw-r--r-- | canvas/workben/canvasdemo.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index 9f21829bca5f..23df7d4c437c 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <com/sun/star/ucb/UniversalContentBroker.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/random.hxx> #include <cppuhelper/bootstrap.hxx> #include <vcl/canvastools.hxx> #include <vcl/svapp.hxx> @@ -424,9 +425,9 @@ class DemoRenderer maRenderState = maOldRenderState; // pop } - double gimmerand() + double gimmerand() { - return static_cast<double>(rand()) / RAND_MAX * 100 + 50; + return comphelper::rng::uniform_real_distribution(0, 100); } void drawArcs() |