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

◆ operator>>() [5/10]

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

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

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

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

+ Here is the call graph for this function: