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

Categorically fix type issues with restore_on_out_of_scope #78460

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

akrieger
Copy link
Member

Summary

None

Purpose of change

Followup to #78452. Eliminate confusion and standardize on an untyped pattern for restore_on_out_of_scope. This categorically avoids issues with explicit typing that doesn't match the type of the variable, which then avoid incorrect behavior caused by compiler generated temporaries for conversions.

Describe the solution

Automatically remove the explicit typing from all restore_on_out_of_scope in the repo with sed. Delete the constructor that accepts a non-T so future erroneous usage gets a compile error.

Describe alternatives you've considered

Not.

Testing

CI.

Additional context

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Vehicles Vehicles, parts, mechanics & interactions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Items: Containers Things that hold other things labels Dec 10, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Auto-requesting reviews from non-collaborators: @Qrox

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Dec 10, 2024
@Night-Pryanik Night-Pryanik merged commit 40b3a32 into CleverRaven:master Dec 10, 2024
20 of 27 checks passed
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Dec 10, 2024
@akrieger akrieger deleted the keyboards_were_a_mistake branch December 10, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Info / User Interface Game - player communication, menus, etc. Items: Containers Things that hold other things json-styled JSON lint passed, label assigned by github actions Monsters Monsters both friendly and unfriendly. Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants