Update DisplayInterface.cs - use StringBuilder instead of concatenation to print#29
Merged
rpavlik merged 3 commits intoOSVR:masterfrom Mar 17, 2015
Merged
Conversation
Member
|
At least the concept of the string changes sounds great. @DuFF14 can you review this? Will it merge with your changes that are also in a pull request? |
Member
|
Yes, good changes and good catch on the "width" typo. Shouldn't interfere with my pull request.
|
rpavlik
added a commit
that referenced
this pull request
Mar 17, 2015
Update DisplayInterface.cs - use StringBuilder instead of concatenation to print
Member
|
Thanks for your contribution, @StellaCannefax ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit changes the long series of string concatenations to print the parsed results in this class with a StringBuilder. This code runs faster (granted, by a millisecond or two), as that's what StringBuilder is for. I think it is also cleaner than the previous code - manually adding newlines like that seemed messy.
In addition, the original code used width where it really seems height should have been used - that has also been changed. Hopefully this is correct ?