| 112 | } |
| 113 | |
| 114 | std::streambuf* ofhbuf::setbuf (char* s, std::streamsize n) |
| 115 | { |
| 116 | if (s == 0 && n == 0) { |
| 117 | // Switch to unbuffered |
| 118 | // This won't take effect until the next overflow or sync |
| 119 | // (We defer it taking effect so that write errors can be properly reported) |
| 120 | // To cause it to take effect as soon as possible, we artificially reduce the |
| 121 | // size of the buffer so it has no space left. This will trigger an overflow |
| 122 | // on the next put. |
| 123 | std::streambuf::setp(pbase(), pptr()); |
| 124 | std::streambuf::pbump(pptr() - pbase()); |
| 125 | buffer_size = 1; |
| 126 | } |
| 127 | return this; |
| 128 | } |
| 129 | |
| 130 | |
| 131 |
nothing calls this directly
no outgoing calls
no test coverage detected