Skip to content

Commit

Permalink
Merge pull request #414 from jwillemsen/jwi-simplifybitsetdefault
Browse files Browse the repository at this point in the history
Simplify bitset default, typedefs are not allowed
  • Loading branch information
jwillemsen authored Nov 26, 2024
2 parents 65ca4a2 + 0621475 commit 1c4321f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions ridlbe/c++11/visitors/bitset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ def default_value
unless node.annotations[:default].first.nil?
"#{node.annotations[:default].first.fields[:value]}"
else
# Check whether it is a typedef, if so, we need to see if there is an annotation applied to the typedef (or its typedef)
res_idl_type = _idltype
while res_idl_type.is_a?(IDL::Type::ScopedName)
unless res_idl_type.node.annotations[:default].first.nil?
return "#{res_idl_type.node.annotations[:default].first.fields[:value]}"
end
res_idl_type = res_idl_type.node.idltype
end
_resolved_idltype.default
_idltype.default
end
end
end
Expand Down

0 comments on commit 1c4321f

Please sign in to comment.