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 aggregate initialization to initialize #358

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

ZXShady
Copy link
Contributor

@ZXShady ZXShady commented Sep 27, 2024

I personally think it is clearer than the variable + member assignments as the layout of sfColor is guranteed and known and this removes some intermediary variables.

src/CSFML/Graphics/Transform.cpp Outdated Show resolved Hide resolved
@ChrisThrasher ChrisThrasher merged commit ef81fbd into SFML:master Sep 28, 2024
39 checks passed
@ZXShady ZXShady deleted the use_aggregate_init branch September 28, 2024 21:06
@eXpl0it3r eXpl0it3r added this to the 3.0 milestone Sep 29, 2024
sfTime time;
time.microseconds = static_cast<int64_t>(amount) * 1000;
return time;
return {static_cast<int64_t>(amount * 1000)};
Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, bug here got fixed in #360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants