mirror of
https://github.com/monero-project/monero.git
synced 2024-12-24 12:09:24 -05:00
serialization: silence warning about shifting uint8_t by 8
Some compilers are stupid and give a warning on this line when `T = uint8_t`, even though it will never run
This commit is contained in:
parent
9866a0e902
commit
eb6f12c213
@ -197,7 +197,7 @@ struct binary_archive<true> : public binary_archive_base<true>
|
||||
{
|
||||
for (size_t i = 0; i < sizeof(T); i++) {
|
||||
stream_.put((char)(v & 0xff));
|
||||
if (1 < sizeof(T)) v >>= 8;
|
||||
if constexpr (1 < sizeof(T)) { v >>= 8; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user