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

◆ operator>>() [5/10]

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

Definition at line 231 of file istream.cpp.

231 {
232 string token;
233 if (readToken(token)) {
234 fl::i32 temp;
235 if (parse_i32(token.c_str(), temp) && temp >= -128 && temp <= 127) {
236 n = static_cast<fl::i8>(temp);
237 } else {
238 failed_ = true;
239 }
240 } else {
241 failed_ = true;
242 }
243 return *this;
244}
bool readToken(string &token)
Definition istream.cpp:173
bool parse_i32(const char *str, fl::i32 &result)
Definition istream.cpp:24
signed char i8
Definition int.h:16

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

+ Here is the call graph for this function: