Skip to content

Commit

Permalink
Fix template parameter duplication if declname is not in xml.
Browse files Browse the repository at this point in the history
  • Loading branch information
r-braun committed Apr 2, 2024
1 parent 2ebc68c commit 53d43cd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mkdoxy/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,11 @@ def array(self, plain: bool = False, notype: bool = False) -> [str]:
ret.append(self.parser.paras_as_str(declname, plain=plain))
else:
type = param.find("type")
declaration = self.parser.paras_as_str(type, plain=plain)
declname = param.find("declname")
if declname is None:
declname = param.find("type")
ret.append(
f"{self.parser.paras_as_str(type, plain=plain)} {self.parser.paras_as_str(declname, plain=plain)}" # noqa: E501
)
if declname is not None:
declaration += ' ' + self.parser.paras_as_str(declname, plain=plain)
ret.append(declaration)
return ret

def has(self) -> bool:
Expand Down

0 comments on commit 53d43cd

Please sign in to comment.