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

Function parse_mouse_path

libop/input/mouse/WinMouse.cpp:138–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138bool parse_mouse_path(const std::wstring &path_text, std::vector<POINT> &path) {
139 path.clear();
140 size_t start = 0;
141 while (start <= path_text.size()) {
142 const size_t end = path_text.find(L'|', start);
143 const std::wstring item = path_text.substr(start, end == std::wstring::npos ? std::wstring::npos : end - start);
144 POINT pt{};
145 if (!parse_path_point(item, pt))
146 return false;
147 path.push_back(pt);
148 if (end == std::wstring::npos)
149 break;
150 start = end + 1;
151 }
152 return path.size() >= 2;
153}
154
155std::vector<POINT> expand_mouse_path(const std::vector<POINT> &key_points) {
156 if (key_points.empty())

Callers 2

MovePathMethod · 0.85
DragPathMethod · 0.85

Calls 4

parse_path_pointFunction · 0.85
findMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected