mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
libi22pd: convert several loops to range based ones
Found with clang-tidy's modernize-loop-convert. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
6cc388c1bc
commit
0dabc88eeb
4 changed files with 12 additions and 12 deletions
|
@ -14,8 +14,8 @@ namespace tunnel
|
|||
m_CurrentTunnelDataMsg (nullptr), m_RemainingSize (0)
|
||||
{
|
||||
RAND_bytes (m_NonZeroRandomBuffer, TUNNEL_DATA_MAX_PAYLOAD_SIZE);
|
||||
for (size_t i = 0; i < TUNNEL_DATA_MAX_PAYLOAD_SIZE; i++)
|
||||
if (!m_NonZeroRandomBuffer[i]) m_NonZeroRandomBuffer[i] = 1;
|
||||
for (unsigned char & i : m_NonZeroRandomBuffer)
|
||||
if (!i) i = 1;
|
||||
}
|
||||
|
||||
TunnelGatewayBuffer::~TunnelGatewayBuffer ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue