summaryrefslogtreecommitdiffstats
path: root/macosx/HBTreeNode.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBTreeNode.m')
-rw-r--r--macosx/HBTreeNode.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/macosx/HBTreeNode.m b/macosx/HBTreeNode.m
index 786e9500b..e02d3e70f 100644
--- a/macosx/HBTreeNode.m
+++ b/macosx/HBTreeNode.m
@@ -18,6 +18,20 @@
return self;
}
+- (id)copyWithZone:(NSZone *)zone
+{
+ HBTreeNode *node = [[self class] allocWithZone:zone];
+ node->_children = [[NSMutableArray alloc] init];
+ node->_isLeaf = self.isLeaf;
+
+ for (HBTreeNode *children in self.children)
+ {
+ [node.children addObject:[children copy]];
+ }
+
+ return node;
+}
+
- (NSUInteger)countOfChildren
{
return self.children.count;