diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-09 20:46:42 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-09 20:46:42 +0000 |
commit | 3b09e847995e9d749e788b030b3e8ca24d5a5780 (patch) | |
tree | df3080fecda27299ec53f2f055d7b31b41ab0dab /clang-format | |
parent | d9d7bf9f30c9c1a1b3baf47de9ddd08c252377c9 (diff) |
Simplify reversed for-loop.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@171998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-format')
-rwxr-xr-x | clang-format/clang-format-diff.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang-format/clang-format-diff.py b/clang-format/clang-format-diff.py index cd01f93d..a22392b3 100755 --- a/clang-format/clang-format-diff.py +++ b/clang-format/clang-format-diff.py @@ -106,10 +106,8 @@ def main(): ranges.append((filename, int(match.group(1)), line_count)) # Reverse the ranges so that the reformatting does not influence file offsets. - ranges.reverse() - - # Do the actual formatting. - for r in ranges: + for r in reversed(ranges): + # Do the actual formatting. formatRange(r, args.style) |