| 41 | #endif // _WIN32 |
| 42 | |
| 43 | std::optional<std::string> MacroActionWindow::GetMatchingWindow() const |
| 44 | { |
| 45 | const auto windows = GetWindows(); |
| 46 | |
| 47 | if (!_regex.Enabled()) { |
| 48 | for (const auto &info : windows) { |
| 49 | if (info.title == std::string(_window)) { |
| 50 | return info.title; |
| 51 | } |
| 52 | } |
| 53 | return {}; |
| 54 | } |
| 55 | |
| 56 | for (const auto &info : windows) { |
| 57 | if (_regex.Matches(info.title, _window)) { |
| 58 | return info.title; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | return {}; |
| 63 | } |
| 64 | |
| 65 | bool MacroActionWindow::PerformAction() |
| 66 | { |
nothing calls this directly
no test coverage detected