FastLED 3.10.6
Loading...
Searching...
No Matches

◆ operator>>() [7/10]

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

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

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

References istream_real(), fl::basic_string::c_str(), mFailed, and readToken().

+ Here is the call graph for this function: