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

Method set_stream

dlib/entropy_encoder/entropy_encoder_kernel_1.cpp:57–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected