refactor: use Span in random.*

This commit is contained in:
pasta
2022-01-31 19:29:33 +07:00
parent cea230eec4
commit 3ae7791bca
12 changed files with 21 additions and 19 deletions

View File

@@ -49,7 +49,7 @@ bool SerializeFileDB(const std::string& prefix, const fs::path& path, const Data
{
// Generate random temporary filename
uint16_t randv = 0;
GetRandBytes((unsigned char*)&randv, sizeof(randv));
GetRandBytes({(unsigned char*)&randv, sizeof(randv)});
std::string tmpfn = strprintf("%s.%04x", prefix, randv);
// open temp output file, and associate with CAutoFile