Skip to content

Commit

Permalink
#12 Secondary sort classes by name
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Sep 26, 2024
1 parent 6fc9a2a commit 9863d06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cppwg/input/module_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def compare(a: CppClassInfo, b: CppClassInfo) -> int:
cache[(b, a)] = 0
return 0

self.class_info_collection.sort(key=lambda x: x.source_file_full_path)
self.class_info_collection.sort(
key=lambda x: (os.path.dirname(x.source_file_full_path), x.name)
)

i = 0
n = len(self.class_info_collection)
Expand Down

0 comments on commit 9863d06

Please sign in to comment.