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

Function ParsePath

tests/op_algorithm_windows_test.cpp:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace {
16
17vector<pair<int, int>> ParsePath(const wstring &path) {
18 vector<pair<int, int>> points;
19 wstringstream stream(path);
20 wstring token;
21 while (getline(stream, token, L'|')) {
22 int x = 0;
23 int y = 0;
24 if (swscanf_s(token.c_str(), L"%d,%d", &x, &y) == 2) {
25 points.emplace_back(x, y);
26 }
27 }
28 return points;
29}
30
31struct ScopedHandle {
32 HANDLE handle = INVALID_HANDLE_VALUE;

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected