diff options
| author | Karl-Johan Alm <[email protected]> | 2016-12-09 12:01:37 +0900 |
|---|---|---|
| committer | Karl-Johan Alm <[email protected]> | 2016-12-09 13:15:19 +0900 |
| commit | 8c1dbc5e9ddbafb77e60e8c4e6eb275a3a76ac12 (patch) | |
| tree | f7f5c60c420a4635e083a6cba153b72aedfb94a2 /src/random.cpp | |
| parent | Merge #9291: Remove mapOrphanTransactionsByPrev from DoS_tests (diff) | |
| download | discoin-8c1dbc5e9ddbafb77e60e8c4e6eb275a3a76ac12.tar.xz discoin-8c1dbc5e9ddbafb77e60e8c4e6eb275a3a76ac12.zip | |
Refactor: Removed begin/end_ptr functions.
Diffstat (limited to 'src/random.cpp')
| -rw-r--r-- | src/random.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/random.cpp b/src/random.cpp index aa027e49c..c2605b45b 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -11,7 +11,6 @@ #include "compat.h" // for Windows API #include <wincrypt.h> #endif -#include "serialize.h" // for begin_ptr(vec) #include "util.h" // for LogPrint() #include "utilstrencodings.h" // for GetTime() @@ -72,15 +71,15 @@ static void RandAddSeedPerfmon() const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data while (true) { nSize = vData.size(); - ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize); + ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, vData.data(), &nSize); if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize) break; vData.resize(std::max((vData.size() * 3) / 2, nMaxSize)); // Grow size of buffer exponentially } RegCloseKey(HKEY_PERFORMANCE_DATA); if (ret == ERROR_SUCCESS) { - RAND_add(begin_ptr(vData), nSize, nSize / 100.0); - memory_cleanse(begin_ptr(vData), nSize); + RAND_add(vData.data(), nSize, nSize / 100.0); + memory_cleanse(vData.data(), nSize); LogPrint("rand", "%s: %lu bytes\n", __func__, nSize); } else { static bool warned = false; // Warn only once |