MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / Read

Method Read

PanzerChasm/save_load_streams.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template<class T>
31void 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
47void LoadStream::ReadBool( bool& b )
48{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected