diff options
Diffstat (limited to 'tools/sort-headers.py')
-rwxr-xr-x | tools/sort-headers.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/sort-headers.py b/tools/sort-headers.py index b18ac6c..d7633e8 100755 --- a/tools/sort-headers.py +++ b/tools/sort-headers.py @@ -34,7 +34,12 @@ def IncludeCompareKey(line): """ for prefix in ('#include ', '#import '): if line.startswith(prefix): - return line[len(prefix):] + line = line[len(prefix):] + break + # <windows.h> needs to be before other includes, so return a key + # that's less than all other keys. + if line.lstrip().startswith('<windows.h>'): + return '' return line |