| 152 | } |
| 153 | |
| 154 | void ApplyRule::CheckMatches(bool silent) |
| 155 | { |
| 156 | for (auto& perSourceType : m_Rules) { |
| 157 | for (auto& perTargetType : perSourceType.second.Regular) { |
| 158 | for (auto& rule : perTargetType.second) { |
| 159 | CheckMatches(rule, perSourceType.first, silent); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | std::unordered_set<ApplyRule*> targeted; |
| 164 | |
| 165 | for (auto& perHost : perSourceType.second.Targeted) { |
| 166 | for (auto& rule : perHost.second.ForHost) { |
| 167 | targeted.emplace(rule.get()); |
| 168 | } |
| 169 | |
| 170 | for (auto& perService : perHost.second.ForServices) { |
| 171 | for (auto& rule : perService.second) { |
| 172 | targeted.emplace(rule.get()); |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | for (auto rule : targeted) { |
| 178 | CheckMatches(rule, perSourceType.first, silent); |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | void ApplyRule::CheckMatches(const ApplyRule::Ptr& rule, Type* sourceType, bool silent) |
| 184 | { |
nothing calls this directly
no test coverage detected