| 153 | } |
| 154 | |
| 155 | void SetFilePosition(std::streambuf& buffer, int64_t position) { |
| 156 | const auto pos = buffer.pubseekpos( |
| 157 | static_cast<std::streambuf::pos_type>(position)); |
| 158 | if (pos < 0) { |
| 159 | throw std::ios_base::failure("Failed to set a stream position"); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | void SetFirstFilePosition(std::streambuf& buffer) { |
| 164 | const auto pos = buffer.pubseekoff(0, std::ios_base::beg); |
no test coverage detected