Browse Source

fixed copy() returning wrong instance

ncannasse 6 years ago
parent
commit
8698281b93
1 changed files with 7 additions and 0 deletions
  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);
 		}
 	}
+	
+	override function copy():EnumValueMap<K, V> {
+		var copied = new EnumValueMap<K, V>();
+		copied.root = root;
+		return copied;
+	}
+	
 }