From 497b6b81bdf59afe1551b2ea38fcc45fe100057d Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Wed, 15 Apr 2020 09:46:54 +0200 Subject: [PATCH] Fix build on Windows. We added our own implementation of rand_r to make sure we use the same as Gimp, and to make Windows work. But we need to actually use it everywhere. Discussion in Differential: Differential Revision: https://phabricator.kde.org/D25267 --- src/imageformats/xcf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imageformats/xcf.cpp b/src/imageformats/xcf.cpp index fe16a83..5bf6077 100644 --- a/src/imageformats/xcf.cpp +++ b/src/imageformats/xcf.cpp @@ -3179,7 +3179,7 @@ void XCFImageFormat::dissolveRGBPixels(QImage &image, int x, int y) } for (int k = 0; k < image.width(); k++) { - int rand_val = rand_r(&next) & 0xff; + int rand_val = RandomTable::rand_r(&next) & 0xff; QRgb pixel = image.pixel(k, l); if (rand_val > qAlpha(pixel)) { @@ -3211,7 +3211,7 @@ void XCFImageFormat::dissolveAlphaPixels(QImage &image, int x, int y) } for (int k = 0; k < image.width(); k++) { - int rand_val = rand_r(&next) & 0xff; + int rand_val = RandomTable::rand_r(&next) & 0xff; uchar alpha = image.pixelIndex(k, l); if (rand_val > alpha) {