MCPcopy Create free account
hub / github.com/davisking/dlib / clear

Method clear

dlib/bit_stream/bit_stream_kernel_1.cpp:26–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24// ----------------------------------------------------------------------------------------
25
26 void bit_stream_kernel_1::
27 clear (
28 )
29 {
30 if (write_mode)
31 {
32 write_mode = false;
33
34 // flush output buffer
35 if (buffer_size > 0)
36 {
37 buffer <<= 8 - buffer_size;
38 osp->write(reinterpret_cast<char*>(&buffer),1);
39 }
40 }
41 else
42 read_mode = false;
43
44 }
45
46// ----------------------------------------------------------------------------------------
47

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected