Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wstring_view for constants instead of wstring #925

Merged
merged 1 commit into from
May 21, 2019
Merged

Use wstring_view for constants instead of wstring #925

merged 1 commit into from
May 21, 2019

Conversation

mauve
Copy link
Contributor

@mauve mauve commented May 21, 2019

Instead of creating const static wstring objects which call malloc in the constructor, use wstring_view instead which just wraps the constant.

Summary of the Pull Request

Simple code refactoring.

References

PR Checklist

  • Closes no bug
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@DHowett-MSFT DHowett-MSFT added the AutoMerge Marked for automatic merge by the bot when requirements are met label May 21, 2019
@ghost
Copy link

ghost commented May 21, 2019

Hello @DHowett-MSFT!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that is not currently met. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me and give me an instruction to get started! Learn more here.

@DHowett-MSFT
Copy link
Contributor

@msftbot make sure @adiviness signs off

@ghost
Copy link

ghost commented May 21, 2019

Hello @DHowett-MSFT!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I'll only merge this pull request if it's approved by @adiviness

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@DHowett-MSFT
Copy link
Contributor

Ah, did I jump the gun? I didn't realize this was a draft. 😄

@DHowett-MSFT DHowett-MSFT removed the AutoMerge Marked for automatic merge by the bot when requirements are met label May 21, 2019
@mauve mauve marked this pull request as ready for review May 21, 2019 22:09
@mauve
Copy link
Contributor Author

mauve commented May 21, 2019

I un-drafted the PR :) thanks for a quick review, glad to contribute!

@adiviness adiviness merged commit 6c7dfd2 into microsoft:master May 21, 2019
zadjii-msft pushed a commit that referenced this pull request May 29, 2019
* Initial code check in for background images

* Cleaning up whitespace

* Whitespace cleanup

* Added/fixed comments

* Fixing tabs

* Reverting erroneous file add

* Removing custom enum for image stretching mode and using Windows::UI::Xaml::Media::Stretch instead.

* Removing now-superfluous static_cast when setting stretch mode.

* Updating code to use wstring_view (per #925)

* One last set of wstring -> wstring_view changes

* Split off brush-intialization function from TermControl::_BackgroundColorChanged and added code to prevent flicker on resetting acrylic or image backgrounds.
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.

3 participants