Ensure that the has_* file actually has data in them. The previous PR had clearly never been tested
This commit is contained in:
parent
1391683607
commit
1cea8b8df6
@ -1530,11 +1530,16 @@ function generate_has_header(hashname, hash)
|
|||||||
file:write(string.format("#ifndef GENERATED_HAS_%s_H\n", hashname))
|
file:write(string.format("#ifndef GENERATED_HAS_%s_H\n", hashname))
|
||||||
file:write(string.format("#define GENERATED_HAS_%s_H\n", hashname))
|
file:write(string.format("#define GENERATED_HAS_%s_H\n", hashname))
|
||||||
file:write("\n")
|
file:write("\n")
|
||||||
for k, v in ipairs(hash) do
|
active = {}
|
||||||
|
for k, v in pairs(hash) do
|
||||||
if v then
|
if v then
|
||||||
file:write(string.format("#define HAS_%s_%s\n", hashname, k))
|
active[#active+1] = k
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
table.sort(active)
|
||||||
|
for _, k in ipairs(active) do
|
||||||
|
file:write(string.format("#define HAS_%s_%s\n", hashname, k))
|
||||||
|
end
|
||||||
file:write("\n")
|
file:write("\n")
|
||||||
file:write("#endif\n")
|
file:write("#endif\n")
|
||||||
file:close()
|
file:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user