Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 17, 2015, 6:28:25 PM (9 years ago)
Author:
muemart
Message:

Use new random number generation functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc

    r10765 r10813  
    3535#include "core/Language.h"
    3636#include "core/ApplicationPaths.h"
     37
     38#include <random>
    3739
    3840namespace orxonox
     
    129131        if (!bInitialized && this->bInitRandomNumberGenerator_)
    130132        {
    131             srand(static_cast<unsigned int>(time(0)));
     133            std::random_device rnddev;
     134            rndseed(rnddev());
     135            //Keep the old seeding around because people will probably still use the old functions
     136            srand(rnddev());
    132137            rand();
    133138            bInitialized = true;
Note: See TracChangeset for help on using the changeset viewer.