Skip to content

Refactor doIndent#4847

Merged
tlively merged 1 commit into
WebAssembly:mainfrom
MaxGraey:refactor-doindent
Jul 29, 2022
Merged

Refactor doIndent#4847
tlively merged 1 commit into
WebAssembly:mainfrom
MaxGraey:refactor-doindent

Conversation

@MaxGraey

Copy link
Copy Markdown
Contributor

Refactor everywhere from:

for (size_t i = 0; i < indent; i++) {
   o << ' ';
}

to:

o << std::string(indent, ' ');

Motivation

It is much simpler and should produce smaller code.See godbolt:
https://godbolt.org/z/KMYMdn7z5

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tlively tlively enabled auto-merge (squash) July 29, 2022 04:12
@tlively tlively merged commit 078f7b9 into WebAssembly:main Jul 29, 2022
@MaxGraey MaxGraey deleted the refactor-doindent branch July 29, 2022 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants