Răsfoiți Sursa

[cpp] Do not store array values in temp variables in case this causes a copy operation.

hughsando 10 ani în urmă
părinte
comite
88800484e1
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      analyzer.ml

+ 1 - 0
analyzer.ml

@@ -236,6 +236,7 @@ module Simplifier = struct
 			with Exit ->
 			with Exit ->
 				begin match follow e.etype with
 				begin match follow e.etype with
 					| TAbstract({a_path = [],"Void"},_) -> true
 					| TAbstract({a_path = [],"Void"},_) -> true
+					| TInst ({ cl_path = [],"Array" }, _) when com.platform = Cpp -> true
 					| _ -> false
 					| _ -> false
 				end
 				end
 		in
 		in