mirror of https://github.com/axmolengine/axmol.git
remove srand function call
This commit is contained in:
parent
774542a341
commit
88efbfc9cc
|
@ -282,7 +282,6 @@ public:
|
|||
{
|
||||
if (!_data.empty())
|
||||
{
|
||||
srand(time(NULL));
|
||||
ssize_t randIdx = rand() % _data.size();
|
||||
iterator randIter = _data.begin();
|
||||
std::advance(randIter , randIdx);
|
||||
|
|
|
@ -229,7 +229,6 @@ public:
|
|||
{
|
||||
if (!_data.empty())
|
||||
{
|
||||
srand(time(NULL));
|
||||
ssize_t randIdx = rand() % _data.size();
|
||||
return *(_data.begin() + randIdx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue