Adding ToString() and std::string cast to Color and Vector classes#249
Merged
RobLoach merged 3 commits intoRobLoach:masterfrom Sep 3, 2023
Merged
Adding ToString() and std::string cast to Color and Vector classes#249RobLoach merged 3 commits intoRobLoach:masterfrom
RobLoach merged 3 commits intoRobLoach:masterfrom
Conversation
Contributor
Author
|
This is a response to what was mentioned in Issue #106. |
RobLoach
reviewed
Sep 3, 2023
include/Color.hpp
Outdated
Comment on lines
70
to
72
| std::ostringstream oss; | ||
| oss << "Color(" << r << ", " << g << ", " << b << ", " << a << ")"; | ||
| return oss.str(); |
Owner
There was a problem hiding this comment.
This is great! We could likely save having to bring in ostringstream by leveraging raylib's TextFormat().
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 adds ToString() and operator std::string to Color and Vector classes. There are some other classes that could benefit from similar treatment, but we have to start somewhere.