Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cf6c60e

Browse files
Rename resolving -> visited
1 parent b96159d commit cf6c60e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎script/vm/sign.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ function mt:resolve(uri, args)
3131
---@type table<string, vm.node>
3232
local resolved = {}
3333
---@type table<string, boolean>
34-
local resolving = {}
34+
local visited = {}
3535

3636
---@param object vm.node|vm.node.object
3737
---@param node vm.node
3838
local function resolve(object, node)
39-
local resolveHash = ("%s|%s"):format(object, node)
40-
if resolving[resolveHash] then
41-
return -- prevent circular resolve calls
39+
local visitedHash = ("%s|%s"):format(object, node)
40+
if visited[visitedHash] then
41+
return -- prevent circular resolve calls by only visiting each pair once
4242
end
43-
resolving[resolveHash] = true
43+
visited[visitedHash] = true
4444
if object.type == 'vm.node' then
4545
for o in object:eachObject() do
4646
resolve(o, node)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /