MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / ParseInt

Method ParseInt

src/openboardview/confparse.cpp:370–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370int Confparse::ParseInt(const char *key, int defaultv) {
371 char *p = Parse(key);
372 if (p) {
373 int v = strtol((char *)Parse(key), NULL, 10);
374 if (errno == ERANGE)
375 return defaultv;
376 else
377 return v;
378 } else
379 return defaultv;
380}
381
382uint32_t Confparse::ParseHex(const char *key, uint32_t defaultv) {
383 char *p = Parse(key);

Callers 3

mainFunction · 0.80
loadFromConfigMethod · 0.80
readFromConfigMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected