Skip to content

Commit eb6f12c

Browse files
committed
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
1 parent 9866a0e commit eb6f12c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serialization/binary_archive.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ struct binary_archive<true> : public binary_archive_base<true>
197197
{
198198
for (size_t i = 0; i < sizeof(T); i++) {
199199
stream_.put((char)(v & 0xff));
200-
if (1 < sizeof(T)) v >>= 8;
200+
if constexpr (1 < sizeof(T)) { v >>= 8; }
201201
}
202202
}
203203

0 commit comments

Comments
 (0)