mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 14:40:12 +01:00
Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
This commit is contained in:
@@ -94,7 +94,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
|
||||
{
|
||||
// If nobody has a time different than ours but within 5 minutes of ours, give a warning
|
||||
bool fMatch = false;
|
||||
for (int64_t nOffset : vSorted)
|
||||
for (const int64_t nOffset : vSorted)
|
||||
if (nOffset != 0 && abs64(nOffset) < 5 * 60)
|
||||
fMatch = true;
|
||||
|
||||
@@ -109,7 +109,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
|
||||
}
|
||||
|
||||
if (LogAcceptCategory(BCLog::NET)) {
|
||||
for (int64_t n : vSorted) {
|
||||
for (const int64_t n : vSorted) {
|
||||
LogPrint(BCLog::NET, "%+d ", n); /* Continued */
|
||||
}
|
||||
LogPrint(BCLog::NET, "| "); /* Continued */
|
||||
|
||||
Reference in New Issue
Block a user