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

Slightly refactor FindRandomNotInVec #920

Merged
merged 1 commit into from
Jul 29, 2016
Merged

Slightly refactor FindRandomNotInVec #920

merged 1 commit into from
Jul 29, 2016

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jul 26, 2016

Just shuffle vector before looping over it. That's a slightly more straightforward way and should make it easier to understand what is going on here imo.

@schinzelh
Copy link

utACK

@schinzelh schinzelh merged commit a4d0120 into dashpay:v0.12.1.x Jul 29, 2016
}
if(fExclude) continue;
// found the one not in vecToExclude
return &mn;
Copy link
Author

Choose a reason for hiding this comment

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

Aaaaand that's a bug - one doesn't simply return an address of local variable and do not crash later :) Will provide a fix.

schinzelh pushed a commit that referenced this pull request Jul 30, 2016
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