MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getc

Method getc

externals/picojson/picojson.h:661–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659 input(const Iter &first, const Iter &last) : cur_(first), end_(last), consumed_(false), line_(1) {
660 }
661 int getc() {
662 if (consumed_) {
663 if (*cur_ == '\n') {
664 ++line_;
665 }
666 ++cur_;
667 }
668 if (cur_ == end_) {
669 consumed_ = false;
670 return -1;
671 }
672 consumed_ = true;
673 return *cur_ & 0xff;
674 }
675 void ungetc() {
676 consumed_ = false;
677 }

Callers 5

_parse_quadhexFunction · 0.80
_parse_codepointFunction · 0.80
_parse_stringFunction · 0.80
_parse_numberFunction · 0.80
_parseFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected