Procházet zdrojové kódy

[cpp] Split vector creation from setting the size

Hugh před 11 roky
rodič
revize
b529584fa8
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      std/haxe/ds/Vector.hx

+ 2 - 1
std/haxe/ds/Vector.hx

@@ -65,7 +65,8 @@ abstract Vector<T>(VectorData<T>) {
 		#elseif java
 			this = new java.NativeArray(length);
 		#elseif cpp
-			this = untyped (new Array<T>()).__SetSizeExact(length);
+			this = new Array<T>();
+			untyped this.__SetSizeExact(length);
 		#elseif python
 			this = python.Syntax.pythonCode("[{0}]*{1}", null, length);
 		#else