Skip to content

use aggregate initialization to initialize#358

Merged
ChrisThrasher merged 1 commit intoSFML:masterfrom
ZXShady:use_aggregate_init
Sep 28, 2024
Merged

use aggregate initialization to initialize#358
ChrisThrasher merged 1 commit intoSFML:masterfrom
ZXShady:use_aggregate_init

Conversation

@ZXShady
Copy link
Copy Markdown
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.

@ChrisThrasher ChrisThrasher merged commit ef81fbd into SFML:master Sep 28, 2024
@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
Copy Markdown
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