From: Orvid King <blah38621@gmail.com>
Date: Wed, 29 Jul 2015 17:45:41 +0000 (-0700)
Subject: Fix Random-inl.h under MSVC
X-Git-Tag: v0.53.0~36
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5e6f4e7780776d79ab90ff18f80e9ff577fa2a2e;p=folly.git

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
---

diff --git a/folly/Random-inl.h b/folly/Random-inl.h
index c7763384..10da8d3a 100644
--- a/folly/Random-inl.h
+++ b/folly/Random-inl.h
@@ -107,7 +107,7 @@ StateSize<std::subtract_with_carry_engine<UIntType, w, s, r>>::value;
 template <class RNG>
 struct 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;