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

Function parse_path_point

libop/input/mouse/WinMouse.cpp:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123bool parse_path_point(const std::wstring &text, POINT &pt) {
124 std::wistringstream stream(text);
125 long x = 0;
126 long y = 0;
127 wchar_t comma = 0;
128 if (!(stream >> x >> comma >> y) || comma != L',')
129 return false;
130 while (stream && std::iswspace(stream.peek()))
131 stream.get();
132 if (!stream.eof())
133 return false;
134 pt = POINT{static_cast<LONG>(x), static_cast<LONG>(y)};
135 return true;
136}
137
138bool parse_mouse_path(const std::wstring &path_text, std::vector<POINT> &path) {
139 path.clear();

Callers 1

parse_mouse_pathFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected