MCPcopy Create free account
hub / github.com/dhbloo/rapfi / fetchOneByte

Method fetchOneByte

Rapfi/database/dbutils.cpp:468–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void RenlibReader::fetchOneByte()
469{
470 // move 1 byte ahead
471 for (int i = 0; i < BYTE_QUEUE_SIZE - 1; i++)
472 byteQueue[i] = byteQueue[i + 1];
473
474 // insert new
475 if (!in.eof()) {
476 char tmpc;
477 in.get(tmpc);
478 byteQueue[BYTE_QUEUE_SIZE - 1].ch = uint8_t(tmpc);
479 byteQueue[BYTE_QUEUE_SIZE - 1].ok = true;
480 }
481 else {
482 byteQueue[BYTE_QUEUE_SIZE - 1].ch = uint8_t(0xff);
483 byteQueue[BYTE_QUEUE_SIZE - 1].ok = false;
484 }
485}
486
487uint8_t RenlibReader::popByte()
488{

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected