浏览代码

Handle overflow in Std.int

Hugh Sanderson 16 年之前
父节点
当前提交
26e05d8ea0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      std/Std.hx

+ 2 - 0
std/Std.hx

@@ -76,6 +76,8 @@ class Std {
 		return untyped __int__(x);
 		#elseif php
 		return untyped __php__("intval")(x);
+		#elseif cpp
+		return untyped __global__.__int__(x);
 		#else
 		if( x < 0 ) return Math.ceil(x);
 		return Math.floor(x);