| 42 | } |
| 43 | |
| 44 | static int find_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) { |
| 45 | for (int i = 0; i < r->resolved_calls.count; i++) { |
| 46 | const CBMResolvedCall *rc = &r->resolved_calls.items[i]; |
| 47 | if (rc->confidence < 0.5f) continue; |
| 48 | if (rc->caller_qn && strstr(rc->caller_qn, callerSub) && rc->callee_qn && |
| 49 | strstr(rc->callee_qn, calleeSub)) { |
| 50 | return i; |
| 51 | } |
| 52 | } |
| 53 | return -1; |
| 54 | } |
| 55 | |
| 56 | static int require_resolved(const CBMFileResult *r, const char *callerSub, const char *calleeSub) { |
| 57 | int idx = find_resolved(r, callerSub, calleeSub); |