MCPcopy Create free account
hub / github.com/WallBreaker2/op / parse_positive_int

Function parse_positive_int

libop/network/HttpClient.cpp:84–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84int parse_positive_int(const std::string &value, int fallback) {
85 if (value.empty()) {
86 return fallback;
87 }
88 const int parsed = atoi(value.c_str());
89 return parsed > 0 ? parsed : fallback;
90}
91
92// --- URL utilities ---
93

Callers 2

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected