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

Method close

dlib/bit_stream/bit_stream_kernel_1.cpp:74–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72// ----------------------------------------------------------------------------------------
73
74 void bit_stream_kernel_1::
75 close (
76 )
77 {
78 if (write_mode)
79 {
80 write_mode = false;
81
82 // flush output buffer
83 if (buffer_size > 0)
84 {
85 buffer <<= 8 - buffer_size;
86 osp->write(reinterpret_cast<char*>(&buffer),1);
87 }
88 }
89 else
90 read_mode = false;
91 }
92
93// ----------------------------------------------------------------------------------------
94

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected