| 138 | virtual __int64 _Length() const = 0; |
| 139 | |
| 140 | void RollbackFilePointer() |
| 141 | { |
| 142 | if (mPos) // Buffered reading was used. |
| 143 | { |
| 144 | // Discard the buffer and rollback the file pointer. |
| 145 | ptrdiff_t offset = (mPos - mBuffer) - mLength; // should be a value <= 0 |
| 146 | _Seek(offset, SEEK_CUR); |
| 147 | // Callers expect the buffer to be cleared (e.g. to be reused for buffered writing), so if |
| 148 | // _Seek fails, the data is simply discarded. This can probably only happen for non-seeking |
| 149 | // devices such as pipes or the console, which won't typically be both read from and written to: |
| 150 | mPos = NULL; |
| 151 | mLength = 0; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | void FlushWriteBuffer() |
| 156 | { |
nothing calls this directly
no outgoing calls
no test coverage detected