mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fix LittleEndian, change endian.h version
This commit is contained in:
parent
9f0391e3f6
commit
728c1a9226
6 changed files with 98 additions and 212 deletions
|
@ -59,12 +59,12 @@ struct LittleEndian
|
|||
return t;
|
||||
}
|
||||
|
||||
const T operator = (const T t)
|
||||
{
|
||||
for (unsigned i = 0; i < sizeof(T); i++)
|
||||
bytes[i] = t >> (i << 3);
|
||||
return t;
|
||||
}
|
||||
const T operator = (const T t)
|
||||
{
|
||||
for (unsigned i = 0; i < sizeof(T); i++)
|
||||
bytes[sizeof(T)-1 - i] = static_cast<unsigned char>(t >> (i << 3));
|
||||
return t;
|
||||
}
|
||||
|
||||
// operators
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue