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

Function positionToOffset

src/external/qhexview/src/model/qhexutils.cpp:312–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311QByteArray toHex(const QByteArray& ba) { return QHexUtils::toHex(ba, '\0'); }
312qint64 positionToOffset(const QHexOptions* options, QHexPosition pos) {
313 return options->linelength * pos.line + pos.column;
314}
315QHexPosition offsetToPosition(const QHexOptions* options, qint64 offset) {
316 return {offset / options->linelength, offset % options->linelength};
317}

Callers 2

getCommentMethod · 0.85
positionToOffsetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected