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

Removed warning caused by calling std::min<int> with size_t values #813

Merged
merged 1 commit into from Aug 15, 2014

Conversation

crozhon
Copy link
Contributor

@crozhon crozhon commented Aug 15, 2014

No description provided.

lioncash added a commit that referenced this pull request Aug 15, 2014
Removed warning caused by calling std::min<int> with size_t values
@lioncash lioncash merged commit 5339c52 into dolphin-emu:master Aug 15, 2014
@crozhon crozhon deleted the min_warning branch August 15, 2014 18:44
@Nucleoprotein
Copy link

This will not overflow badly if code sizes are bigger than int ?
Better for me will be to use something like: http://vpaste.net/KA3r2

@lioncash
Copy link
Member

That can work too, however it's assigned to a u16 further on down, so it
would overflow regardless.
On Aug 15, 2014 5:24 PM, "tapcio" notifications@github.com wrote:

This will not overflow badly if code sizes are bigger than int ?
Better for me will be to use something like:
const size_t min_size = std::min(code1.size(), code2.size());


Reply to this email directly or view it on GitHub
#813 (comment).

@lioncash
Copy link
Member

By 'it' I mean the 'i' variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants