Lines 1-25
Link Here
|
1 |
--- src/tools.cc.orig 2022-10-20 09:17:55 UTC |
|
|
2 |
+++ src/tools.cc |
3 |
@@ -1135,11 +1135,13 @@ uint64_t random64() |
4 |
/* ###### Get 32-bit random value ######################################## */ |
5 |
uint32_t random32() |
6 |
{ |
7 |
+/* |
8 |
#ifdef NDEBUG |
9 |
#warning Using OMNeT++ random generator instead of time-seeded one! |
10 |
const double value = uniform(0.0, (double)0xffffffff); |
11 |
return((uint32_t)rint(value)); |
12 |
#else |
13 |
+*/ |
14 |
uint32_t number; |
15 |
|
16 |
switch(RandomSource) { |
17 |
@@ -1165,7 +1167,7 @@ uint32_t random32() |
18 |
const uint16_t a = random() & 0xffff; |
19 |
const uint16_t b = random() & 0xffff; |
20 |
return( (((uint32_t)a) << 16) | (uint32_t)b ); |
21 |
-#endif |
22 |
+ |
23 |
} |
24 |
|
25 |
|