MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / operator[]

Method operator[]

src/cryptlib/queue.cpp:253–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253byte ByteQueue::operator[](unsigned long i) const
254{
255 for (ByteQueueNode *current=head; current; current=current->next)
256 {
257 if (i < current->CurrentSize())
258 return (*current)[i];
259
260 i -= current->CurrentSize();
261 }
262
263 // i should be less than CurrentSize(), therefore we should not be here
264 assert(false);
265 return 0;
266}

Callers

nothing calls this directly

Calls 1

CurrentSizeMethod · 0.45

Tested by

no test coverage detected