diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-04 20:19:45 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-04 20:19:45 +0200 |
| commit | 40435a6da8392c86fd120ec6b4fbda0bd1c89ab3 (patch) | |
| tree | dc9ea550a3e49259cca847e049f76306f3ed6014 /include/io | |
| parent | 5e750cf89484c3229100534137def1627368146c (diff) | |
| download | Project-Tick-40435a6da8392c86fd120ec6b4fbda0bd1c89ab3.tar.gz Project-Tick-40435a6da8392c86fd120ec6b4fbda0bd1c89ab3.zip | |
Implement stream_reader
Diffstat (limited to 'include/io')
| -rw-r--r-- | include/io/stream_reader.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/io/stream_reader.h b/include/io/stream_reader.h index ab07f83ad9..5d10e021ed 100644 --- a/include/io/stream_reader.h +++ b/include/io/stream_reader.h @@ -65,8 +65,7 @@ public: /** * @brief Reads a binary number from the stream - * - * Does not check if the reading actually succeeds + * @throw input_error on failure */ template<class T> void read_num(T& x); @@ -85,6 +84,12 @@ private: const endian::endian endian; }; +template<class T> +void stream_reader::read_num(T& x) +{ + endian::read(is, x, endian); +} + } } |
