| ... | ... | @@ -104,7 +104,7 @@ pub const Node = struct { |
| 104 | 104 | return @intToEnum(Color, @intCast(u1, node.parent_and_color & 1)); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | | fn set_child(node: *Node, child: ?*Node, is_left: bool) void { |
| 107 | fn setChild(node: *Node, child: ?*Node, is_left: bool) void { |
| 108 | 108 | if (is_left) { |
| 109 | 109 | node.left = child; |
| 110 | 110 | } else { |
| ... | ... | @@ -172,7 +172,7 @@ pub const Tree = struct { |
| 172 | 172 | node.setParent(maybe_parent); |
| 173 | 173 | |
| 174 | 174 | if (maybe_parent) |parent| { |
| 175 | | parent.set_child(node, is_left); |
| 175 | parent.setChild(node, is_left); |
| 176 | 176 | } else { |
| 177 | 177 | tree.root = node; |
| 178 | 178 | } |
| ... | ... | @@ -250,7 +250,7 @@ pub const Tree = struct { |
| 250 | 250 | // This clause is to avoid optionals |
| 251 | 251 | if (node.left == null and node.right == null) { |
| 252 | 252 | if (maybe_parent) |parent| { |
| 253 | | parent.set_child(null, parent.left == node); |
| 253 | parent.setChild(null, parent.left == node); |
| 254 | 254 | } else |
| 255 | 255 | tree.root = null; |
| 256 | 256 | color = node.getColor(); |
| ... | ... | @@ -264,7 +264,7 @@ pub const Tree = struct { |
| 264 | 264 | next = node.right.?.getFirst(); // Just checked for null above |
| 265 | 265 | |
| 266 | 266 | if (maybe_parent) |parent| { |
| 267 | | parent.set_child(next, parent.left == node); |
| 267 | parent.setChild(next, parent.left == node); |
| 268 | 268 | } else |
| 269 | 269 | tree.root = next; |
| 270 | 270 | |
| ... | ... | @@ -387,7 +387,7 @@ pub const Tree = struct { |
| 387 | 387 | if (tree.compareFn(old, new) != mem.Compare.Equal) return ReplaceError.NotEqual; |
| 388 | 388 | |
| 389 | 389 | if (old.getParent()) |parent| { |
| 390 | | parent.set_child(new, parent.left == old); |
| 390 | parent.setChild(new, parent.left == old); |
| 391 | 391 | } else |
| 392 | 392 | tree.root = new; |
| 393 | 393 | |