diff options
| author | ruki <[email protected]> | 2021-05-26 23:30:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-05-26 23:30:44 +0800 |
| commit | 9177f156bb1b70fb7adea5c10b6db22012048769 (patch) | |
| tree | eef35bde44f533987e18666886f8b47a7bca9684 /xmake/modules/core/tools/clang_cl.lua | |
| parent | 7d1291b310e771c903922ebf4502372c7339c72e (diff) | |
remove more ifelse again
Diffstat (limited to 'xmake/modules/core/tools/clang_cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/clang_cl.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua index 22a28f20c..4e0046fe8 100644 --- a/xmake/modules/core/tools/clang_cl.lua +++ b/xmake/modules/core/tools/clang_cl.lua @@ -205,7 +205,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) -- get 16 lines of errors if start > 0 then - lines = table.slice(lines, start, start + ifelse(#lines - start > 16, 16, #lines - start)) + lines = table.slice(lines, start, start + ((#lines - start > 16) and 16 or (#lines - start))) end end @@ -220,7 +220,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) if ok and errdata and #errdata > 0 and (option.get("diagnosis") or option.get("warning")) then local lines = errdata:split('\n', {plain = true}) if #lines > 0 then - local warnings = table.concat(table.slice(lines, 1, ifelse(#lines > 8, 8, #lines)), "\n") + local warnings = table.concat(table.slice(lines, 1, (#lines > 8 and 8 or #lines)), "\n") cprint("${color.warning}%s", warnings) end end |
