Skip to content

Commit

Permalink
Don't return params from type const &
Browse files Browse the repository at this point in the history
  • Loading branch information
Seadragon91 committed May 1, 2017
1 parent 80c2548 commit e3b59e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bin/lua/declaration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ end

-- Return parameter value
function classDeclaration:retvalue ()
-- Bail out, if is_parameter is true and it's a const &
if self.is_parameter and string.match(self.type, "const") and self.ret == "&" then
return 0
end

if self.ret ~= '' then
local t,ct = isbasic(self.type)
if t and t~='' then
Expand Down

0 comments on commit e3b59e5

Please sign in to comment.