Skip to content

Commit

Permalink
Replace static_cast with explicit template type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRStevens committed Mar 4, 2025
1 parent 5730f69 commit 65cc107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NAS2D/Renderer/Fade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void Fade::update()
return;
}

const auto step = static_cast<uint8_t>(std::clamp(mFadeTimer.elapsedTicks() * 255u / static_cast<unsigned int>(mDuration.milliseconds), 0u, 255u));
const auto step = static_cast<uint8_t>(std::clamp<unsigned int>(mFadeTimer.elapsedTicks() * 255u / mDuration.milliseconds, 0u, 255u));
mFadeColor.alpha = (mDirection == FadeDirection::In) ? 255 - step : step;

if (step == 255)
Expand Down

0 comments on commit 65cc107

Please sign in to comment.