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:
jeffro256 2024-11-08 15:06:28 -06:00
parent 9866a0e902
commit eb6f12c213
No known key found for this signature in database
GPG Key ID: 6F79797A6E392442
1 changed files with 1 additions and 1 deletions

View File

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