Explorar o código

minor haxe.io.Path optimization - use StringTools.fastCodeAt where index is guaranteed to be valid

Dan Korostelev %!s(int64=8) %!d(string=hai) anos
pai
achega
490c0052ae
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      std/haxe/io/Path.hx

+ 1 - 1
std/haxe/io/Path.hx

@@ -229,7 +229,7 @@ class Path {
 		var colon = false;
 		var slashes = false;
 		for (i in 0...tmp.length) {
-			switch (tmp.charCodeAt(i)) {
+			switch (StringTools.fastCodeAt(tmp, i)) {
 				case ":".code:
 					acc.add(":");
 					colon = true;