diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-05-31 14:25:51 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-05-31 14:30:11 +0200 |
commit | 573b6298596fae8708982c65db0b66b989299805 (patch) | |
tree | 509a601bca29a64e866dbd3a66bbc3c059b90504 /gcc/rust | |
parent | 9a1ae92194805c055c7b5c7b3b7b26c3b2da8365 (diff) | |
download | gcc-573b6298596fae8708982c65db0b66b989299805.zip gcc-573b6298596fae8708982c65db0b66b989299805.tar.gz gcc-573b6298596fae8708982c65db0b66b989299805.tar.bz2 |
ast: Indent: Improve indent formatting performance
Co-authored-by: ndrwnaguib <ndrwnaguib@gmail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 1afb988..64966c9 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -26,10 +26,7 @@ Indent::Indent () : tabs (0) {} std::ostream & operator<< (std::ostream &stream, const Indent &indent) { - for (size_t i = 0; i < indent.tabs; i++) - stream << '\t'; - - return stream; + return stream << std::string (indent.tabs, '\t'); } void |