From 7890d077a891aab6284c3616f309a878b16e3dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lie=20Delhaie?= Date: Sun, 18 Dec 2022 22:00:38 +0100 Subject: [PATCH] Fix Windows/Linux build --- src/tools.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tools.cpp b/src/tools.cpp index 8b9f174..3dd196f 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -16,14 +16,14 @@ Tools::Tools() const QColor Tools::getRandomColor() { srand(time(0)); -#ifdef __linux__ - uint8_t r = rand() % 255; - uint8_t g = rand() % 255; - uint8_t b = rand() % 255; -#else +#ifdef __APPLE__ uint8_t r = arc4random() % 255; uint8_t g = arc4random() % 255; uint8_t b = arc4random() % 255; +#else + uint8_t r = rand() % 255; + uint8_t g = rand() % 255; + uint8_t b = rand() % 255; #endif return QColor(r, g, b); }