mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[gardening] Use !empty() over size() > 0
This commit is contained in:
@@ -496,7 +496,7 @@ CandidateSpecificMatcher::scoreCandidateTrial(unsigned firstPatternPos) {
|
||||
trialScore += patternLength / static_cast<double>(baseNameLength) * 0.25;
|
||||
|
||||
// Exact matches are even better.
|
||||
if (patternLength >= baseNameLength && runs.size() > 0 &&
|
||||
if (patternLength >= baseNameLength && !runs.empty() &&
|
||||
runs[0].location == 0) {
|
||||
trialScore *= 1.1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user