1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-26 21:20:46 +03:00

Add a comment

This commit is contained in:
Rui Ueyama 2022-01-21 11:00:36 +09:00
parent 2b034335ec
commit 036fdf0b29

View File

@ -14,6 +14,9 @@ public:
}
operator T() const {
// We don't need to optimize this code because compilers are
// usually smart enough to compile this loop into a single
// byte-swap instruction such as x86's bswap.
T ret = 0;
for (int i = 0; i < sizeof(T); i++)
ret = (ret << 8) | val[i];