Changeset 11071 for code/trunk/src/libraries/core/CoreConfig.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/CoreConfig.cc
r11052 r11071 35 35 #include "core/Language.h" 36 36 #include "core/ApplicationPaths.h" 37 38 #include <random> 37 39 38 40 namespace orxonox … … 106 108 { 107 109 // Inform listeners 108 ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin(); 109 for (; it != ObjectList<DevModeListener>::end(); ++it) 110 it->devModeChanged(bDevMode_); 110 for (DevModeListener* listener : ObjectList<DevModeListener>()) 111 listener->devModeChanged(bDevMode_); 111 112 } 112 113 … … 129 130 if (!bInitialized && this->bInitRandomNumberGenerator_) 130 131 { 131 srand(static_cast<unsigned int>(time(0))); 132 std::random_device rnddev; 133 rndseed(rnddev()); 134 //Keep the old seeding around because people will probably still use the old functions 135 srand(rnddev()); 132 136 rand(); 133 137 bInitialized = true; … … 137 141 void CoreConfig::updateLastLevelTimestamp() 138 142 { 139 ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time( NULL)));143 ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(nullptr))); 140 144 } 141 145 142 146 void CoreConfig::updateOgreConfigTimestamp() 143 147 { 144 ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time( NULL)));148 ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(nullptr))); 145 149 } 146 150
Note: See TracChangeset
for help on using the changeset viewer.