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

Method set_stream

dlib/entropy_encoder/entropy_encoder_kernel_2.cpp:55–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53// ----------------------------------------------------------------------------------------
54
55 void entropy_encoder_kernel_2::
56 set_stream (
57 std::ostream& out_
58 )
59 {
60 if (out != 0)
61 {
62 // if a stream is currently set then flush the buffers to it before
63 // we switch to the new stream
64 flush();
65 }
66
67 out = &out_;
68 streambuf = out_.rdbuf();
69
70 // reset the encoder state
71 low = initial_low;
72 high = initial_high;
73 }
74
75// ----------------------------------------------------------------------------------------
76

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected