Fix Windows/Linux build
This commit is contained in:
1 parent
159b3064b1
commit
7890d077a8
1 file changed
+5
-5
+5
-5
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user