Random.h is currently used only in one test, and can be safely replaced by mersenne_twister for test purposes. As it's not used anywhere else it's useless and can be removed.
Details
- Reviewers
Silier vladislavbelov - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP22175: Remove useless class, test class and use boost instead of it in…
rP22178: Fix rP22175. Refs #5428
Check that the removal make sense.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 7140 Build 11648: Vulcan Build Jenkins
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... source/simulation2/components/tests/test_RangeManager.h | 1| /*·Copyright·(C)·2017·Wildfire·Games. | | [NORMAL] LicenseYearBear: | | License should have "2019" year instead of "2017" Executing section JS... Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1182/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1183/display/redirect
I accept this because:
- Project builds
- WELL512 is used only to test rangeManager
- claims to be effectively a better version of MT19937, however used only once for test since 2011 (mt19937 requires 2496 bytes - not really too much I think)
- looks to me like not needed class just for this file ( I do not think anyone runs tests every day to need this boost in memory )
- boost::mt19937 is used in: test_Sqrt (last change in file 2011 after WELL512 introduction), Noise (2006 introduction with mt19937 not replaced by WELL512), ObjectBase, ParticleManager
Actually we run all tests on our server for each diff, so it does matters if it significantly slower.
Also what's about distribution?
Well if distribution did matter we would use it everywhere no ?
It's a small loop so by looking at the profiling I did today won't affect it much.
The WELL512 usage was introduces in rP10446 along a bug fixing. So the only question is: would be enough to have the mt19937 to prevent the bug.