Commit 5e6f4e77 authored by Orvid King's avatar Orvid King Committed by facebook-github-bot-1

Fix Random-inl.h under MSVC

Summary: With MSVC, `seedData.begin()` does not return a `void*`, so get a pointer to the data, and explicitly cast that to a `void*` instead.
Closes #251

Reviewed By: @yfeldblum

Differential Revision: D2282929

Pulled By: @sgolemon
parent e405081d
...@@ -107,7 +107,7 @@ StateSize<std::subtract_with_carry_engine<UIntType, w, s, r>>::value; ...@@ -107,7 +107,7 @@ StateSize<std::subtract_with_carry_engine<UIntType, w, s, r>>::value;
template <class RNG> template <class RNG>
struct SeedData { struct SeedData {
SeedData() { SeedData() {
Random::secureRandom(seedData.begin(), seedData.size() * sizeof(uint32_t)); Random::secureRandom(seedData.data(), seedData.size() * sizeof(uint32_t));
} }
static constexpr size_t stateSize = StateSize<RNG>::value; static constexpr size_t stateSize = StateSize<RNG>::value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment