summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-29 22:55:28 +0800
committerruki <[email protected]>2026-03-29 22:55:28 +0800
commit8841ed9f7b427896f042abcfb3537dd731f6a923 (patch)
treed2cb01d00f1873851e86199deef19dda20c43702 /xmake/modules/core/tools/cl.lua
parent1bccfc273af2b1d579d033324bca481e15c58653 (diff)
improve const limit codes
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index c945e163b..02a562e06 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -704,8 +704,7 @@ function _show_warnings(self, output, sourcefile)
local has_warnings = false
local has_source_dependencies = _has_source_dependencies(self)
for _, line in ipairs(output:split("\n", {plain = true})) do
- local line = line
- line = line:rtrim()
+ local line = line:rtrim()
if #line > 0 then
local skip = false
@@ -808,8 +807,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
else
-- filter includes notes: "Note: including file: xxx.h", @note maybe not english language
for _, line in ipairs(tostring(errors):split("\n", {plain = true})) do
- local line = line
- line = line:rtrim()
+ local line = line:rtrim()
if not parse_include.has_include_note(line) then
results = results .. line .. "\r\n"
end