pass RNG by reference so state is updated on each call
authorChristopher Small <cas@fb.com>
Tue, 27 Dec 2016 00:45:14 +0000 (16:45 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 27 Dec 2016 00:47:55 +0000 (16:47 -0800)
commitf2987ecd74d921af398f7592762fbf1ec67bab1a
tree323f79e8b511e6a722a6c7a58044a554a68ec236
parentd981781257155966cae1470ce40cca8702a3ca20
pass RNG by reference so state is updated on each call

Summary: folly::Random was taking the RNG by value (not reference) so it was not updating the RNG's state on each invocation -- so the RNG would not advance to the next value in the sequence.

Reviewed By: yfeldblum, nbronson

Differential Revision: D4362999

fbshipit-source-id: f93fc11911b92e230ac0cc2406151474d15f85af
folly/Random.h
folly/test/RandomTest.cpp