MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / getsize

Method getsize

utils/sbufstream.h:188–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Calls

no outgoing calls

Tested by

no test coverage detected