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

◆ operator>>() [3/10]

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

Definition at line 261 of file istream.cpp.

261 {
262 string token;
263 if (readToken(token)) {
264 fl::i32 temp;
265 if (parse_i32(token.c_str(), temp) && temp >= -32768 && temp <= 32767) {
266 n = static_cast<fl::i16>(temp);
267 } else {
268 failed_ = true;
269 }
270 } else {
271 failed_ = true;
272 }
273 return *this;
274}
bool readToken(string &token)
Definition istream.cpp:173
bool parse_i32(const char *str, fl::i32 &result)
Definition istream.cpp:24

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

+ Here is the call graph for this function: