fix LittleEndian, change endian.h version

This commit is contained in:
chertov 2014-02-05 09:14:07 +04:00
parent 9f0391e3f6
commit 728c1a9226
6 changed files with 98 additions and 212 deletions

View file

@ -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