Skip to content

Commit

Permalink
ClangFormat the reverseWalk(). (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen authored May 31, 2022
1 parent ce56401 commit f484645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Megrez/1_BlockReadingBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ extension Megrez {
var path: [NodeAnchor] = reverseWalk(at: location - nodeZero.spanningLength, score: nodeZero.accumulatedScore)
path.insert(nodeZero, at: 0)
paths.append(path)
} else if longPhrases.count > 0 {
} else if !longPhrases.isEmpty {
var path = [NodeAnchor]()
for theAnchor in nodes {
guard let theNode = theAnchor.node else { continue }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Megrez/4_Node.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extension Megrez {
$0.score > $1.score
}

if mutUnigrams.count > 0 {
if !mutUnigrams.isEmpty {
mutScore = mutUnigrams[0].score
}

Expand Down

0 comments on commit f484645

Please sign in to comment.