MCPcopy Create free account
hub / github.com/clementgallet/libTAS / read

Method read

src/external/qhexview/src/model/buffer/qmappedfilebuffer.cpp:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15QByteArray QMappedFileBuffer::read(qint64 offset, int length) {
16 if(offset >= this->length())
17 return {};
18
19 if(offset + length >= this->length())
20 length = this->length() - offset;
21
22 return QByteArray::fromRawData(
23 reinterpret_cast<const char*>(m_mappeddata + offset), length);
24}
25
26bool QMappedFileBuffer::read(QIODevice* iodevice) {
27 m_device = qobject_cast<QFile*>(iodevice);

Callers

nothing calls this directly

Calls 2

remapMethod · 0.95
lengthMethod · 0.45

Tested by

no test coverage detected