FastLED 3.10.8
Loading...
Searching...
No Matches

◆ get()

int fl::istream_real::get ( )

Definition at line 371 of file istream.cpp.hpp.

371 {
372 if (mPos >= mBufferLen && fl::available() > 0) {
373 if (!readLine()) {
374 return -1;
375 }
376 }
377
378 if (mPos < mBufferLen) {
379 return static_cast<int>(static_cast<unsigned char>(mBuffer[mPos++]));
380 }
381
382 // Try to read directly from input if buffer is empty
383 return fl::read();
384}
fl::size mBufferLen
Definition istream.h:32
fl::size mPos
Definition istream.h:33
char mBuffer[BUFFER_SIZE]
Definition istream.h:31
bool readLine() FL_NO_EXCEPT
int read() FL_NO_EXCEPT
int available() FL_NO_EXCEPT

References fl::available(), fl::FL_NO_EXCEPT, mBuffer, mBufferLen, mPos, fl::read(), and readLine().

Referenced by fl::istream::get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: