Skip to content

[Shaman] Suppress a Conversion Warning #10301

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

Open
wants to merge 1 commit into
base: thewarwithin
Choose a base branch
from

Conversation

Saeldur
Copy link
Contributor

@Saeldur Saeldur commented Jun 1, 2025

Fixes a type conversion warning caused by it incorrectly using rng().range on double,double assumed types due to the inputs not matching by forcing it to use it for size_t, which then converts implicitly without any precision loss fine.
Shouldn't cause any issues but I haven't confirmed if behaviour is altered (negatively or positively)

@Saeldur Saeldur requested a review from navv1234 June 1, 2025 18:23
@renanthera
Copy link
Member

Alternatively, you could replace nearly the whole method with rng().shuffle( ++tl.begin(), tl.end() );, but it certainly has subtly different behaviour to the current implementation, even with the shuffle-thoroughness variable set to 1.0.

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.

2 participants