FastLED 3.9.15
Loading...
Searching...
No Matches

◆ operator>>() [7/10]

istream_real & fl::istream_real::operator>> ( fl::u8 & n)

Definition at line 246 of file istream.cpp.

246 {
247 string token;
248 if (readToken(token)) {
249 fl::u32 temp;
250 if (parse_u32(token.c_str(), temp) && temp <= 255) {
251 n = static_cast<fl::u8>(temp);
252 } else {
253 failed_ = true;
254 }
255 } else {
256 failed_ = true;
257 }
258 return *this;
259}
bool readToken(string &token)
Definition istream.cpp:173
bool parse_u32(const char *str, fl::u32 &result)
Definition istream.cpp:81
unsigned char u8
Definition int.h:17

References istream_real(), fl::StrN< SIZE >::c_str(), failed_, and readToken().

+ Here is the call graph for this function: