mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: replace sizeof(a)/sizeof(a[0]) by std::size (C++17)
Removes the macro ARRAYLEN and also substitutes all other uses of the same "sizeof(a)/sizeof(a[0])" pattern by std::size, available since C++17.
This commit is contained in:
@@ -88,7 +88,7 @@ void static RandomScript(CScript &script) {
|
||||
script = CScript();
|
||||
int ops = (InsecureRandRange(10));
|
||||
for (int i=0; i<ops; i++)
|
||||
script << oplist[InsecureRandRange(sizeof(oplist)/sizeof(oplist[0]))];
|
||||
script << oplist[InsecureRandRange(std::size(oplist))];
|
||||
}
|
||||
|
||||
void static RandomTransaction(CMutableTransaction &tx, bool fSingle) {
|
||||
|
||||
Reference in New Issue
Block a user