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

Method read

tests/streamtests/streamtests.cc:117–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 }
116
117 static KTX_error_code read(ktxStream* str, void* dst, ktx_size_t count)
118 {
119 auto self = parent(str);
120 if (count == 0)
121 {
122 return KTX_SUCCESS;
123 }
124 std::cerr << "\t read: " << count << 'B' << std::endl;
125
126 const auto stdcount = std::streamsize(count);
127 const std::streamsize nread = self->_streambuf->sgetn(reinterpret_cast<char*>(dst), stdcount);
128 return (nread == stdcount) ? KTX_SUCCESS : KTX_FILE_UNEXPECTED_EOF;
129 }
130
131 static KTX_error_code skip(ktxStream* str, ktx_size_t count)
132 {

Callers 3

WaitMethod · 0.45
TESTFunction · 0.45
loadFileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected