mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
minor performance improvements
This commit is contained in:
parent
7ee8bdf2f3
commit
474d52f805
@ -323,7 +323,7 @@ namespace crypto
|
||||
for (int i = 63; i >= 0; i--)
|
||||
{
|
||||
uint16_t sum = buf[i] + other.buf[i] + carry;
|
||||
ret.buf[i] = sum & 0xFF;
|
||||
ret.buf[i] = sum;
|
||||
carry = sum >> 8;
|
||||
}
|
||||
return ret;
|
||||
@ -333,9 +333,10 @@ namespace crypto
|
||||
{
|
||||
for (int i = 63; i >= 0; i--)
|
||||
{
|
||||
if (!c) return;
|
||||
c += buf[i];
|
||||
buf[i] = c;
|
||||
c >>= 8;
|
||||
c >>= 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user