We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55f68e6 commit 7170998Copy full SHA for 7170998
src/ConnectionStyle.cpp
@@ -1,6 +1,6 @@
1
#include "ConnectionStyle.hpp"
2
3
-#include <iostream>
+#include "StyleCollection.hpp"
4
5
#include <QtCore/QFile>
6
#include <QtCore/QJsonDocument>
@@ -10,7 +10,7 @@
10
11
#include <QDebug>
12
13
-#include "StyleCollection.hpp"
+#include <random>
14
15
using QtNodes::ConnectionStyle;
16
@@ -166,8 +166,10 @@ normalColor(QString typeId) const
166
167
std::size_t const hue_range = 0xFF;
168
169
- qsrand(hash);
170
- std::size_t hue = qrand() % hue_range;
+ std::mt19937 gen(hash);
+ std::uniform_int_distribution<> distrib(0, hue_range);
171
+
172
+ std::size_t hue = distrib(gen);
173
174
std::size_t sat = 120 + hash % 129;
175
0 commit comments