diff --git a/byte_order_stuff.cpp b/byte_order_stuff.cpp index 6f204d6..3ee9070 100644 --- a/byte_order_stuff.cpp +++ b/byte_order_stuff.cpp @@ -72,6 +72,14 @@ void data_streamer::putsi24(int32_t val, std::ostream& file) const { putui24(static_cast(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(f80._val), sizeof(f80._val)); +} + // byte_order_changer ---------------------------------------------------------- byte_order_changer::byte_order_changer(data_streamer* ds, byte_order order) : _data_streamer {ds} {