diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-09-24 15:30:18 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-09-24 15:30:18 +0200 |
commit | cf31570dffa4ebfbb5544f5a5ccdcbae559fb524 (patch) | |
tree | 66ad080c1158cc58663f29330685056a092c5b4f /src/os | |
parent | 276b9a93c2e3b9ac58a9ddb5fff4c8299c459222 (diff) |
outputstream: Add << for float and double
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/object/outputstream.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/os/object/outputstream.cc b/src/os/object/outputstream.cc index 31b0da4..f257fa5 100644 --- a/src/os/object/outputstream.cc +++ b/src/os/object/outputstream.cc @@ -98,6 +98,18 @@ OutputStream & OutputStream::operator<<(long long number) return *this; } +OutputStream & OutputStream::operator<<(double number) +{ + *this << (float)number; + return *this; +} + +OutputStream & OutputStream::operator<<(float number) +{ + this->printf_float(number); + return *this; +} + OutputStream & OutputStream::operator<<(void *pointer) { unsigned short temp_base = base; |