| 8916 | } |
| 8917 | |
| 8918 | uint32 CheckMatch(const StringView& str, int startIdx = 0) |
| 8919 | { |
| 8920 | uint32 matchFlags = 0; |
| 8921 | for (int i = startIdx; i < mSearch.mSize; i++) |
| 8922 | { |
| 8923 | auto& search = mSearch[i]; |
| 8924 | if (((mFoundFlags & (1 << i)) == 0) && (str.IndexOf(search.mStr, true) != -1)) |
| 8925 | { |
| 8926 | bool genericMatches = true; |
| 8927 | if (search.mGenericCount > 0) |
| 8928 | { |
| 8929 | genericMatches = false; |
| 8930 | int countIdx = (int)str.LastIndexOf('`'); |
| 8931 | if (countIdx > 0) |
| 8932 | { |
| 8933 | int genericCount = atoi(str.mPtr + countIdx + 1); |
| 8934 | genericMatches = ((genericCount == search.mGenericCount) || (search.mGenericCount == 1)) && |
| 8935 | (countIdx == (int)search.mStr.length()); |
| 8936 | } |
| 8937 | } |
| 8938 | |
| 8939 | if (genericMatches) |
| 8940 | { |
| 8941 | mFoundCount++; |
| 8942 | matchFlags |= (1 << i); |
| 8943 | mFoundFlags |= (1 << i); |
| 8944 | } |
| 8945 | } |
| 8946 | } |
| 8947 | return matchFlags; |
| 8948 | } |
| 8949 | |
| 8950 | bool CheckCompletesMatch(BfAtomComposite& name) |
| 8951 | { |
no test coverage detected