| 186 | } |
| 187 | |
| 188 | static KTX_error_code getsize(ktxStream* str, ktx_size_t* size) |
| 189 | { |
| 190 | auto self = parent(str); |
| 191 | const std::streampos oldpos = self->_streambuf->pubseekoff(0, std::ios::cur, self->_seek_mode); |
| 192 | *size = ktx_size_t(self->_streambuf->pubseekoff(0, std::ios::end)); |
| 193 | const std::streampos newpos = self->_streambuf->pubseekoff(oldpos, std::ios::beg, self->_seek_mode); |
| 194 | logstream << "\t size: " << *size << 'B' << std::endl; |
| 195 | return (oldpos == newpos) ? KTX_SUCCESS : KTX_FILE_SEEK_ERROR; |
| 196 | } |
| 197 | |
| 198 | static void destruct(ktxStream* str) |
| 199 | { |
no outgoing calls
no test coverage detected