search for a given byte in the stream, and remain positioned on it
| 695 | |
| 696 | // search for a given byte in the stream, and remain positioned on it |
| 697 | void FindByte(char ch) { |
| 698 | while (true) { |
| 699 | if (nReadPos == nSrcPos) |
| 700 | Fill(); |
| 701 | if (vchBuf[nReadPos % vchBuf.size()] == ch) |
| 702 | break; |
| 703 | nReadPos++; |
| 704 | } |
| 705 | } |
| 706 | }; |
| 707 | |
| 708 | #endif // BITCOIN_STREAMS_H |
no test coverage detected