MCPcopy Create free account
hub / github.com/AGWA/git-crypt / overflow

Method overflow

fhstream.cpp:59–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59ofhbuf::int_type ofhbuf::overflow (ofhbuf::int_type c)
60{
61 const char* p = pbase();
62 std::streamsize bytes_to_write = pptr() - p;
63
64 if (!is_eof(c)) {
65 *pptr() = c;
66 ++bytes_to_write;
67 }
68
69 while (bytes_to_write > 0) {
70 const size_t bytes_written = write_fun(handle, p, bytes_to_write);
71 bytes_to_write -= bytes_written;
72 p += bytes_written;
73 }
74
75 reset_buffer();
76
77 return traits_type::to_int_type(0);
78}
79
80int ofhbuf::sync ()
81{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected