| 29 | |
| 30 | template<class T> |
| 31 | void LoadStream::Read( T& t ) |
| 32 | { |
| 33 | static_assert( |
| 34 | std::is_integral<T>::value || std::is_floating_point<T>::value, |
| 35 | "Expected basic types" ); |
| 36 | |
| 37 | PC_ASSERT( buffer_pos_ + sizeof(T) <= buffer_.size() ); |
| 38 | |
| 39 | std::memcpy( |
| 40 | &t, |
| 41 | buffer_.data() + buffer_pos_, |
| 42 | sizeof(T) ); |
| 43 | |
| 44 | buffer_pos_+= sizeof(T); |
| 45 | } |
| 46 | |
| 47 | void LoadStream::ReadBool( bool& b ) |
| 48 | { |
nothing calls this directly
no outgoing calls
no test coverage detected