mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
Cleanup
This commit is contained in:
parent
f3d1e92856
commit
786402365e
1 changed files with 3 additions and 2 deletions
|
@ -515,8 +515,9 @@ template<typename T>
|
|||
T readLittleEndian(unsigned char * p)
|
||||
{
|
||||
T x = 0;
|
||||
for (size_t i = 0; i < sizeof(x); ++i)
|
||||
x |= ((T) *p++) << (i * 8);
|
||||
for (size_t i = 0; i < sizeof(x); ++i, ++p) {
|
||||
x |= ((T) *p) << (i * 8);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue