-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adding support for std::string_view to sf::String #2451
Conversation
Cleaned up formatting and added comments
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2451 +/- ##
==========================================
- Coverage 23.15% 23.14% -0.02%
==========================================
Files 212 212
Lines 18063 18073 +10
Branches 4405 4406 +1
==========================================
Hits 4183 4183
- Misses 13152 13162 +10
Partials 728 728
Continue to review full report in Codecov by Sentry.
|
Okay, I don't know what the formatter wants, then. it appears to be objecting to my empty lines and replacing them with its own empty lines. I checked the line endings and they're uniform with the rest of the file. shrug |
It's saying that you have trailing whitespace on those lines that needs to be removed. A line with on code on it should not contain 4 spaces. It should contain precisely one newline character and that is all. You an build the |
I've never used clang. Is this something I can/should do on github? |
You're better off just copying the output from the failed CI job then. If you're not on Windows, clang-format (which is different from clang) is very easy to install and use but on Windows it may be harder. |
Okay. I think I've got it sorted out now. Actually, if clang-format is standalone then I'll look at running it from my RPi before uploading anything new. |
Please do not make another PR. That's not the right way to use GitHub. Just add another commit to this PR. |
Understood. Another project I worked on wanted to only pull single commits,
so I wasn't sure. In the future I'll make a new branch and then figure it
out from there.
…On Wed, Mar 15, 2023, 11:05 AM Chris Thrasher ***@***.***> wrote:
Okay. I think I've got it sorted out now. Should I push another commit, or
just nuke this and submit another PR?
Please do not make another PR. That's not the right way to use GitHub.
Just add another commit to this PR.
—
Reply to this email directly, view it on GitHub
<#2451 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXDSQENB7SXO3RN43YU5PDW4IAINANCNFSM6AAAAAAV4EIXH4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You can still have single-commit PRs if you like. You can amend a commit in a branch and do a force push to update a PR without adding a 2nd commit. There are various options that are better than making a new PR every time you need to make a single change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to hold off on this PR until we can merge #2466. Currently sf::String
has no tests which makes me hesitant to add features. Otherwise I think I like this.
@ChrisThrasher: should also wait for #2480 and #2470? |
Yeah I think I'd prefer it wait if anything just to avoid merge conflicts. I apologize for the delays. This PR was part of what inspired me to look into |
This can be rebased onto master now 🙂 |
Is that something I need to do, or can someone who knows what needs to be done take care of it? |
It's something that you ought to do |
How do I do it? |
https://learngitbranching.js.org This website has tutorials on Git rebasing you can learn from. |
Thanks! |
modified String to integrate with the u32char_t changes and copied over existing project with current state of master
Ack, I didn't mean for that to come here. |
Okay, so I reverted that and then told it to update from SFML/master, then I resolved the conflicts and looked over it and I think that what I have locally is correct, but when I try to build it I get:
Should this be building cleanly? |
Yes. Update to CMake 3.24 or newer to fix it. It's an issue with MSVC not supporting system headers until recently. You can disable |
I can't find a way to get rid of the screw-up I made earlier. I have a branch called "string_view" on my repo that has what I want in it, and I'd like to get it to just take the place of my "master" on this PR, but there doesn't seem to be a way to wipe out the history of my screw ups in "master". I can revert the change I made, but it still sees that as 76 changed files, etc. I can make a new PR to solve this quickly (I'm sorry, I know that's annoying) but I can't figure out any other way to fix this at present. I'm going to try to push a revert and see what it does. |
This reverts commit b383a3d.
commit 5c1c795 Author: Khatharr <khatharr@users.noreply.github.com> Date: Wed Apr 12 19:49:59 2023 -0700 Support for string_view Adds support to sf::String to allow construction from std::string_view and variants thereof commit 82b9821 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Thu Feb 2 23:31:48 2023 -0700 Add clang-tidy `bugprone-*` checks commit 9269edc Author: binary1248 <binary1248@hotmail.com> Date: Fri Mar 10 02:05:42 2023 +0100 Add OpenGL ES jobs to ci.yml. commit 705307f Author: binary1248 <binary1248@hotmail.com> Date: Wed Apr 12 01:58:51 2023 +0200 Skip OpenGL version printout when test-sfml-window does not exist commit 913d735 Author: binary1248 <binary1248@hotmail.com> Date: Wed Apr 12 01:37:05 2023 +0200 Don't repeatedly run test setup code commit 038030a Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Fri Apr 7 21:51:29 2023 -0600 Fix how CTest config is specified commit 7a8192a Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Fri Apr 7 20:42:54 2023 -0600 Fix bug where CTest failing did not fail CI job commit 1da3e80 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Fri Apr 7 22:42:12 2023 -0600 Disable Xcode code signing via configuration parameter commit 2d6d4a4 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Mon Jan 30 15:10:18 2023 -0700 Allow for manually triggering CI commit 6692284 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Sat Apr 8 15:22:38 2023 -0600 Force `brew install` to succeed commit cafaa1c Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Sat Apr 8 12:51:35 2023 -0600 Add clang-tidy `performance-*` checks commit ea4c448 Author: binary1248 <binary1248@hotmail.com> Date: Sun Mar 26 14:21:21 2023 +0200 Add support for installing and using the Mesa 3D library for OpenGL rendering. commit 0700119 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Thu Apr 6 08:45:46 2023 -0600 Clean up namespace usage Always use std:: and always omit sf:: commit f5e6c67 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Tue Jan 31 14:49:40 2023 -0700 Remove unnecessary `std::string::c_str()` calls commit 61aeff1 Author: binary1248 <binary1248@hotmail.com> Date: Thu Apr 6 04:00:01 2023 +0200 Fixed wglGetProcAddress not providing OpenGL 1.1 functions when the context is provided by an Nvidia ICD. commit 485d367 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Sun Apr 2 15:14:31 2023 -0600 Inline `sfml_add_external` commit 21af6fe Author: binary1248 <binary1248@hotmail.com> Date: Sun Mar 26 04:44:05 2023 +0200 Fixed OpenGL entry points being loaded from OpenGL32.dll instead of failing to load if they are not provided by the vendor provided library on Windows. commit 2c99b33 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Mon Sep 5 23:18:29 2022 -0600 Remove default `sf::Text` constructor commit 57a40c5 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Mon Sep 5 23:08:54 2022 -0600 Be explicit about when new keys are added to the map commit f3aac01 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Wed Mar 1 22:50:45 2023 -0700 Use structured bindings commit f371a99 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Sat Mar 25 22:02:29 2023 -0600 Implement `sf::String` in terms of `std::u32string` commit 93a8506 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Thu Mar 30 08:21:50 2023 -0600 Let compiler generated special member functions commit 988a38e Author: Vittorio Romeo <vittorio.romeo@outlook.com> Date: Tue Apr 4 15:54:41 2023 +0200 Improve PCH by adding more commonly used headers commit 6a3feda Author: Jonathan De Wachter <dewachter.jonathan@gmail.com> Date: Wed Sep 28 18:43:10 2016 +0700 Make EGL pixel format selection follow the same procedure as the other context types and make OpenGL context version parsing more tolerant of garbage data. Fixes SFML#2395 commit 7004db1 Author: binary1248 <binary1248@hotmail.com> Date: Fri Mar 10 01:38:14 2023 +0100 Added sf::RenderWindow, sf::Shader and sf::Window tests. commit ebe4b3c Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Wed Mar 22 21:40:17 2023 -0600 Add tests for `sf::String` commit 14dbd3c Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Tue Mar 28 21:48:20 2023 -0600 Remove old workaround for MinGW's lack of unicode support Dates back to 2009 when 78247bd was written. I'm going to assume the situation has improved in the last 14 years. There are SFML users who weren't even alive in 2009... commit 06c5c50 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Tue Mar 28 21:27:51 2023 -0600 De-`constexpr` `sf::String::InvalidPos` This fails to link on MinGW. Until that can be resolved we can go back to a normal constant. Because this is just an integer it doesn't matter all that much whether it's const or constexpr. commit 741fe21 Author: Jonny <jonathan.r.paton@googlemail.com> Date: Mon Apr 3 22:36:33 2023 +0100 Use built-in CMake support for iOS * Use built-in iOS support for cmake and expand tests to cover more configurations * Adjust CI builds * Update examples version --------- Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com> commit 92e5a1e Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Thu Mar 30 23:30:30 2023 -0600 Implement move semantics for `sf::Cursor` commit d500eee Merge: 5048c4d 5ebba36 Author: Lukas Dürrenberger <eXpl0it3r@sfml-dev.org> Date: Sun Apr 2 00:30:16 2023 +0200 Merge branch '2.6.x' into master commit 5ebba36 Merge: 5048c4d 541e83e Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Sat Apr 1 15:23:48 2023 -0600 Merge branch '2.6.x' into feature/backmerge commit 541e83e Author: binary1248 <binary1248@hotmail.com> Date: Sat Apr 1 02:48:15 2023 +0200 Disable stringop-overflow warning when including minimp3 since it produces false positives. commit 5048c4d Author: binary1248 <binary1248@hotmail.com> Date: Fri Mar 10 02:05:53 2023 +0100 Added sf::Texture tests. commit a8bc8cf Author: Jim-Marsden <47166310+Jim-Marsden@users.noreply.github.com> Date: Sat Nov 19 21:06:35 2022 -0800 Added move constructor, and move assignment operator. commit 2d2f684 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Thu Mar 23 14:13:52 2023 -0600 Fix clang-tidy-16 errors commit 2151ea5 Author: Lukas Dürrenberger <eXpl0it3r@my-gate.net> Date: Tue Mar 28 22:04:50 2023 +0200 Align search box styling with the doc style - Update doxyfile.in file to v1.9.6 - Add additional search box CSS overrides commit 25da983 Author: binary1248 <binary1248@hotmail.com> Date: Sun Mar 26 04:41:26 2023 +0200 Fixed GlContext not being activated if it shares the same address as a previously destroyed GlContext. commit acba3e6 Author: binary1248 <binary1248@hotmail.com> Date: Sun Mar 26 14:09:33 2023 +0200 Replaced xvfb-run with manually starting Xvfb and running fluxbox to emulate a window manager and combined test and coverage steps into a single step. commit ccda8a9 Author: binary1248 <binary1248@hotmail.com> Date: Fri Mar 17 03:04:11 2023 +0100 Reduce TransientContextLock overhead if there is already a context active on the current thread. commit 05d9f20 Author: binary1248 <binary1248@hotmail.com> Date: Fri Mar 24 02:18:46 2023 +0100 Since the CODECOV_TOKEN secret isn't being made available to every pull request, revert to having the Codecov uploader auto-detect. commit 1bb494f Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Wed Mar 22 22:02:30 2023 -0600 Upgrade to stb_image 2.28 commit b510042 Author: binary1248 <binary1248@hotmail.com> Date: Thu Mar 23 02:25:36 2023 +0100 Fixed Codecov uploader being run with the SHA of the merge commit instead of the HEAD commit when a job is run in a pull request context. commit bc5ddb3 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Wed Mar 22 22:08:43 2023 -0600 Don't automatically build docs This means you can leave the docs enabled in the build without being constantly spammed by all the console output that entails. https://salsa.debian.org/games-team/libsfml/-/blob/master/debian/patches/02_build-doc-once.patch commit 2df7984 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Wed Mar 22 22:09:33 2023 -0600 Remove commented out CSS tag https://salsa.debian.org/games-team/libsfml/-/blob/master/debian/patches/01_remove-googleapi-css.patch commit 1058448 Author: Chris Thrasher <chrisjthrasher@gmail.com> Date: Tue Mar 21 15:05:46 2023 -0600 Export symbol required to use sfml-activity commit 6ca627e Author: binary1248 <binary1248@hotmail.com> Date: Thu Mar 16 04:02:39 2023 +0100 Manually upload coverage report instead of using codecov-action.
Okay, I think I have it... Let's see how it likes this... :( No good. |
You can open a new PR if that's what you need |
Moved to #2517 |
Description
Revision of #2447
I went ahead and cleaned up formatting and added comments, just to get it done.
This PR is related to the issue #2445
Tasks
How to test this PR?
Test driver (same as before):