浏览代码

fixed copy() returning wrong instance

ncannasse 7 年之前
父节点
当前提交
8698281b93
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      std/haxe/ds/EnumValueMap.hx

+ 7 - 0
std/haxe/ds/EnumValueMap.hx

@@ -58,4 +58,11 @@ class EnumValueMap<K:EnumValue, V> extends haxe.ds.BalancedTree<K, V> implements
 			Reflect.compare(v1, v2);
 			Reflect.compare(v1, v2);
 		}
 		}
 	}
 	}
+	
+	override function copy():EnumValueMap<K, V> {
+		var copied = new EnumValueMap<K, V>();
+		copied.root = root;
+		return copied;
+	}
+	
 }
 }