Skip to content

Commit

Permalink
restored __NOEXCEPT formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
RoseZhang03 committed Jul 17, 2024
1 parent 5e45051 commit c16998a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libc/newhdrgen/class_implementation/classes/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __str__(self):
attributes_str = " ".join(self.attributes)
arguments_str = ", ".join(self.arguments)
if attributes_str == "":
result = f"{self.return_type} {self.name}({arguments_str}) __NOEXCEPT;"
result = f"{self.return_type} {self.name}({arguments_str})"
else:
result = f"{attributes_str} {self.return_type} {self.name}({arguments_str}) __NOEXCEPT;"
result = f"{attributes_str} {self.return_type} {self.name}({arguments_str})"
return result
8 changes: 4 additions & 4 deletions libc/newhdrgen/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,24 @@ def __str__(self):
current_guard = None
for function in self.functions:
if function.guard == None:
content.append(str(function))
content.append(str(function) + "__NOEXCEPT;")
content.append("")
else:
if current_guard == None:
current_guard = function.guard
content.append(f"#ifdef {current_guard}")
content.append(str(function))
content.append(str(function) + "__NOEXCEPT;")
content.append("")
elif current_guard == function.guard:
content.append(str(function))
content.append(str(function) + "__NOEXCEPT;")
content.append("")
else:
content.pop()
content.append(f"#endif // {current_guard}")
content.append("")
current_guard = function.guard
content.append(f"#ifdef {current_guard}")
content.append(str(function))
content.append(str(function) + "__NOEXCEPT;")
content.append("")
if current_guard != None:
content.pop()
Expand Down

0 comments on commit c16998a

Please sign in to comment.