MCPcopy Create free account
hub / github.com/Illumina/paragraph / readNumber

Method readNumber

external/jsoncpp/jsoncpp.cpp:642–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640}
641
642void Reader::readNumber() {
643 const char *p = current_;
644 char c = '0'; // stopgap for already consumed character
645 // integral part
646 while (c >= '0' && c <= '9')
647 c = (current_ = p) < end_ ? *p++ : '\0';
648 // fractional part
649 if (c == '.') {
650 c = (current_ = p) < end_ ? *p++ : '\0';
651 while (c >= '0' && c <= '9')
652 c = (current_ = p) < end_ ? *p++ : '\0';
653 }
654 // exponential part
655 if (c == 'e' || c == 'E') {
656 c = (current_ = p) < end_ ? *p++ : '\0';
657 if (c == '+' || c == '-')
658 c = (current_ = p) < end_ ? *p++ : '\0';
659 while (c >= '0' && c <= '9')
660 c = (current_ = p) < end_ ? *p++ : '\0';
661 }
662}
663
664bool Reader::readString() {
665 Char c = '\0';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected