Added putf80 method, which was not implemented yet

This commit is contained in:
Bob Polis 2021-11-03 17:28:13 +01:00
parent cf9836f2a2
commit 789ad958a1

View File

@ -72,6 +72,14 @@ void data_streamer::putsi24(int32_t val, std::ostream& file) const {
putui24(static_cast<uint32_t>(val), file);
}
void data_streamer::putf80(double val, std::ostream& file) const {
float_80 f80 {val};
if (_target_byte_order != byte_order::big_endian) {
byte_swap(f80._val, sizeof(f80._val));
}
file.write(reinterpret_cast<char*>(f80._val), sizeof(f80._val));
}
// byte_order_changer ----------------------------------------------------------
byte_order_changer::byte_order_changer(data_streamer* ds, byte_order order) : _data_streamer {ds} {