From 7d1291b310e771c903922ebf4502372c7339c72e Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 26 May 2021 23:30:14 +0800 Subject: remove some ifelse --- xmake/modules/core/tools/cl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmake/modules/core/tools/cl.lua') diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 46f488815..d95d58e5d 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -466,7 +466,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) end end if #lines > 0 then - local warnings = table.concat(table.slice(lines, 1, ifelse(#lines > 8, 8, #lines)), "\r\n") + local warnings = table.concat(table.slice(lines, 1, (#lines > 8 and 8 or #lines)), "\r\n") if progress.showing_without_scroll() then print("") end -- cgit v1.3.1