Index: tools/sort-headers.py |
diff --git a/tools/sort-headers.py b/tools/sort-headers.py |
index b18ac6c4a83147e85a1051df45fa7f8e4206ac6e..c7c60ec6fb36a2adfc1dd7dad3cdbc75f55319b4 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.find('<windows.h>') != -1: |
Evan Martin
2011/05/19 20:04:33
Maybe test .startswith() instead? (will catch the
Nico
2011/05/19 20:06:21
Done. (lstrip().startswith() if someone accidental
|
+ return '' |
return line |