Skip to content

Cast ENV_HALF_CIRCLE_DEGREES to double in ENVIRONMENT_UpdateLightIntensity - #249

Open
ResurrectedTrader wants to merge 1 commit into
ThePhrozenKeep:masterfrom
ResurrectedTrader:fix/environment-enum-double-division
Open

ResurrectedTrader wants to merge 1 commit into
ThePhrozenKeep:masterfrom
ResurrectedTrader:fix/environment-enum-double-division

Conversation

@ResurrectedTrader

Copy link
Copy Markdown
Contributor

ENVIRONMENT_UpdateLightIntensity divides a double by the unscoped enumerator ENV_HALF_CIRCLE_DEGREES. Arithmetic between a floating-point type and an enumeration is deprecated in C++20 (clang: -Wdeprecated-enum-float-conversion) and ill-formed in C++26 (P2864), so building this file with clang in a newer language mode fails.

Cast the enumerator to double. No behaviour change.

🤖 Generated with Claude Code

…nsity

ENVIRONMENT_UpdateLightIntensity divides a double by the unscoped
enumerator ENV_HALF_CIRCLE_DEGREES. Arithmetic between a floating-point
type and an enumeration is deprecated in C++20 (clang's
-Wdeprecated-enum-float-conversion) and ill-formed in C++26. Cast the
enumerator. No behaviour change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant