OSDN Git Service
(root)
/
lamexp
/
LameXP.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2190c25
)
Got ride of more legacy compatibility code.
author
LoRd_MuldeR
<mulder2@gmx.de>
Fri, 11 Oct 2013 18:40:28 +0000
(20:40 +0200)
committer
LoRd_MuldeR
<mulder2@gmx.de>
Fri, 11 Oct 2013 18:40:28 +0000
(20:40 +0200)
src/Global.cpp
patch
|
blob
|
history
diff --git
a/src/Global.cpp
b/src/Global.cpp
index
8a31142
..
664e1a9
100644
(file)
--- a/
src/Global.cpp
+++ b/
src/Global.cpp
@@
-2354,21
+2354,18
@@
void lamexp_seed_rand(void)
*/
unsigned int lamexp_rand(void)
{
- unsigned int rnd = 0;
- if(const lamexp_os_version_t* osVer = lamexp_get_os_version())
+ quint32 rnd = 0;
+
+ if(rand_s(&rnd) == 0)
{
- if(LAMEXP_MIN_OS_VER(osVer, 5, 1))
- {
- if(rand_s(&rnd) == 0)
- {
- return rnd;
- }
- }
+ return rnd;
}
+
for(size_t i = 0; i < sizeof(unsigned int); i++)
{
rnd = (rnd << 8) ^ qrand();
}
+
return rnd;
}