| 155 | } |
| 156 | |
| 157 | std::unique_ptr<function::ScanReplacementData> ClientContext::tryReplaceByName( |
| 158 | const std::string& objectName) const { |
| 159 | for (auto& scanReplacement : scanReplacements) { |
| 160 | auto replaceHandles = scanReplacement.lookupFunc(objectName); |
| 161 | if (replaceHandles.empty()) { |
| 162 | continue; // Fail to replace. |
| 163 | } |
| 164 | return scanReplacement.replaceFunc(std::span(replaceHandles.begin(), replaceHandles.end())); |
| 165 | } |
| 166 | return {}; |
| 167 | } |
| 168 | |
| 169 | std::unique_ptr<function::ScanReplacementData> ClientContext::tryReplaceByHandle( |
| 170 | function::scan_replace_handle_t handle) const { |
no test coverage detected