MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / _parse_number

Function _parse_number

libraries/AP_JSON/AP_JSON.cpp:565–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565template <typename Iter> std::string _parse_number(input<Iter> &in)
566{
567 std::string num_str;
568 while (1) {
569 int ch = in.getc();
570 if (('0' <= ch && ch <= '9') || ch == '+' || ch == '-' || ch == 'e' || ch == 'E') {
571 num_str.push_back(static_cast<char>(ch));
572 } else if (ch == '.') {
573 num_str.push_back('.');
574 } else {
575 in.ungetc();
576 break;
577 }
578 }
579 return num_str;
580}
581
582template <typename Context, typename Iter> bool _parse(Context &ctx, input<Iter> &in)
583{

Callers 1

_parseFunction · 0.85

Calls 2

getcMethod · 0.80
ungetcMethod · 0.80

Tested by

no test coverage detected