MCPcopy Create free account
hub / github.com/FastLED/FastLED / peek

Method peek

src/fl/stl/istream.cpp.hpp:402–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402int istream_real::peek() {
403 if (mPos >= mBufferLen && fl::available() > 0) {
404 if (!readLine()) {
405 return -1;
406 }
407 }
408
409 if (mPos < mBufferLen) {
410 return static_cast<int>(static_cast<unsigned char>(mBuffer[mPos]));
411 }
412
413 return -1;
414}
415
416} // namespace fl

Callers 1

FL_TEST_FILEFunction · 0.45

Calls 2

readLineFunction · 0.85
availableFunction · 0.70

Tested by

no test coverage detected