1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix clang-tidy type promotion errors

This commit is contained in:
sfan5 2024-02-24 00:07:46 +01:00
parent 229389b7f6
commit 9fcd7f2dc0
10 changed files with 20 additions and 17 deletions

View file

@ -31,11 +31,11 @@ void TileAnimationParams::serialize(std::ostream &os, u16 protocol_ver) const
if (type == TAT_VERTICAL_FRAMES) {
writeU16(os, vertical_frames.aspect_w);
writeU16(os, vertical_frames.aspect_h);
writeF32(os, need_abs ? fabs(vertical_frames.length) : vertical_frames.length);
writeF32(os, need_abs ? std::abs(vertical_frames.length) : vertical_frames.length);
} else if (type == TAT_SHEET_2D) {
writeU8(os, sheet_2d.frames_w);
writeU8(os, sheet_2d.frames_h);
writeF32(os, need_abs ? fabs(sheet_2d.frame_length) : sheet_2d.frame_length);
writeF32(os, need_abs ? std::abs(sheet_2d.frame_length) : sheet_2d.frame_length);
}
}