APIDump: member variables without a setter are considered constants.
This fixes cChatColor constants being reported erroneously as member variables.
This commit is contained in:
parent
ec94104a3c
commit
34de5210d6
@ -158,11 +158,18 @@ function CreateAPITables()
|
||||
end
|
||||
|
||||
-- Member variables:
|
||||
local SetField = a_ClassObj[".set"] or {};
|
||||
if ((a_ClassObj[".get"] ~= nil) and (type(a_ClassObj[".get"]) == "table")) then
|
||||
for k, v in pairs(a_ClassObj[".get"]) do
|
||||
if (SetField[k] == nil) then
|
||||
-- It is a read-only variable, add it as a constant:
|
||||
table.insert(res.Constants, {Name = k, Value = ""});
|
||||
else
|
||||
-- It is a read-write variable, add it as a variable:
|
||||
table.insert(res.Variables, { Name = k });
|
||||
end
|
||||
end
|
||||
end
|
||||
return res;
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user