Skip to content

Commit c889cd3

Browse files
committed
fix NSXMLNode for SE-011
1 parent 22579bc commit c889cd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSXMLNode.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ public class XMLNode: NSObject, NSCopying {
578578
if let parentNode = _CFXMLNodeGetParent(parent!) {
579579
let grandparent = XMLNode._objectNodeForNode(parentNode)
580580
let possibleParentNodes = grandparent.filter { $0.name == self.parent?.name }
581-
let count = possibleParentNodes.reduce(0) {
582-
return $0.0 + 1
581+
let count = possibleParentNodes.reduce(0) { n, _ in
582+
return n + 1
583583
}
584584

585585
if count <= 1 {

0 commit comments

Comments
 (0)