• Norbert Thiebaud's avatar
    seed mt19937 with random data · 011563a0
    Norbert Thiebaud yazdı
    time(NULL) is a poor seed. It is quite predictable and
    multiple instance starting in the same second will get the same seed
    and therefore the same pseudo random number sequence
    
    Use std::random_device, witch is meant to provide 'true' random
    data.. mix time(NULL) just in case the std implementation is crappy.
    
    PS: sadly std::random_device.entropy() cannot be relied on
    as clang and gcc are known to return 0 despite their random_device
    being non-deterministic, hence the prophylactic systematic
    mixing with time(null)
    
    Change-Id: I44dab9970f8f0388dc1c99e9816d49d1afbecf18
    Reviewed-on: https://gerrit.libreoffice.org/15591Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
    011563a0
Adı
Son kayıt (commit)
Son güncelleme
..
inc/pch Loading commit data...
qa Loading commit data...
source Loading commit data...
util Loading commit data...
CppunitTest_comphelper_syntaxhighlight_test.mk Loading commit data...
CppunitTest_comphelper_test.mk Loading commit data...
JunitTest_comphelper_complex.mk Loading commit data...
Library_comphelper.mk Loading commit data...
Makefile Loading commit data...
Module_comphelper.mk Loading commit data...
README Loading commit data...