Merge pull request #9560

eb6f12c serialization: silence warning about shifting uint8_t by 8 (jeffro256)
This commit is contained in:
luigi1111 2024-12-23 10:53:35 -05:00
commit 91b0a249e3
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

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