MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / tryParseResolution

Function tryParseResolution

cpp/orbbec/record.cpp:83–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83std::pair<int, int> tryParseResolution(const std::string &s) {
84 std::istringstream iss(s);
85
86 int width, height;
87 char comma;
88 if (iss >> width >> comma >> height && comma == ',') {
89 return std::make_pair(width, height);
90 } else {
91 std::cerr << "Failed to parse resolution from " << s << std::endl;
92 exit(EXIT_FAILURE);
93 }
94}
95
96int main(int argc, char *argv[]) {
97 std::vector<std::string> arguments(argv, argv + argc);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected