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

Method read

tools/ktx/command_compare.cpp:1216–1227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1214 void compareImagesPerPixel(PrintDiff& diff, InputStreams& streams);
1215
1216 void read(InputStream& stream, std::size_t offset, void* readDst, std::size_t readSize, std::string_view what) {
1217 stream->seekg(offset);
1218 if (stream->fail())
1219 fatal(rc::IO_FAILURE, "Failed to seek file to {} \"{}\": {}.", what, stream.str(), errnoMessage());
1220
1221 stream->read(reinterpret_cast<char*>(readDst), readSize);
1222 if (stream->eof()) {
1223 fatal(rc::IO_FAILURE, "Unexpected end of file reading {} from file \"{}\".", what, stream.str());
1224 } else if (stream->fail()) {
1225 fatal(rc::IO_FAILURE, "Failed to read {} from file \"{}\": {}.", what, stream.str(), errnoMessage());
1226 }
1227 }
1228
1229 template <typename T>
1230 std::vector<T> read(InputStreams& streams, std::size_t offset, std::string_view what) {

Callers 8

validateHeaderMethod · 0.45
validateLevelIndexMethod · 0.45
validateDfdMethod · 0.45
validateKvdMethod · 0.45
validateSgdMethod · 0.45
executeInfoMethod · 0.45
printInfoJSONMethod · 0.45
readRawFileMethod · 0.45

Calls 5

fatalClass · 0.85
errnoMessageFunction · 0.70
readFunction · 0.50
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected