Make SortedTree immutable for now.

This commit is contained in:
Eric Harding committed 2018-03-13 16:16:11 -04:00
1 parent d2a2de0a4d
commit 02cc555cc0
1 file changed
+2 -2
@@ -27,7 +27,7 @@ namespace bts.collections {
// Insert (return: true) or overwrite (return false) a new value
// NOTE: you should use AddAll if you are adding multiple values
public bool Insert(T item) {
bool Insert(T item) {
var item_id = id(item);
if (!_index.TryGetValue(item_id, out Node itemnode)) {
// Item is new
@@ -57,7 +57,7 @@ namespace bts.collections {
}
}
}
public void Remove(T item) {
void Remove(T item) {
var item_id = id(item);
if (_index.TryGetValue(item_id, out Node itemnode)) {
if (_index.TryGetValue(parent(item), out Node parentnode)) {