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

Remove the min/max functions in CommonFuncs. #334

Merged
merged 1 commit into from May 30, 2014

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented May 3, 2014

The algorithm header defines these, so it seems a little redundant to keep these.

@@ -158,15 +158,11 @@ extern "C" {
#endif // M_IX86
#endif // WIN32 ndef

// Dolphin's min and max functions
// Undefine any min or max macros that might get defined
// (whether it be though Windows headers, or other libraries)
#undef min

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@shuffle2
Copy link
Contributor

shuffle2 commented May 3, 2014

@shuffle2
Copy link
Contributor

How about

#define NOMINMAX
#include <windows.h>
#undef NOMINMAX

and then always explicitly use std:: before min/max?

@shuffle2
Copy link
Contributor

Can you please make these changes so this can be merged @lioncash ...

@lioncash
Copy link
Member Author

I was planning to do so after work.
On May 29, 2014 5:14 PM, "shuffle2" notifications@github.com wrote:

Can you please make these changes so this can be merged @lioncash
https://github.com/lioncash ...


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

The algorithm header has the same functions.
shuffle2 added a commit that referenced this pull request May 30, 2014
Remove the min/max functions in CommonFuncs.
@shuffle2 shuffle2 merged commit 8fc83d8 into dolphin-emu:master May 30, 2014
@lioncash lioncash deleted the use-std-minmax branch May 30, 2014 03:13
phire added a commit to phire/dolphin that referenced this pull request Jul 14, 2014
Another issue from dolphin-emu#334 with the casting moved from the output of
min to it's inputs.

This is a non-issue on 64 bit machines, but if dolphin is compiled
on an OS with size_t == u32 (say ARM) then remainingSize could be
truncated.

Restored the casting to the original order before dolphin-emu#334.
MikeRavenelle pushed a commit to MikeRavenelle/dolphin that referenced this pull request Sep 2, 2014
Another issue from dolphin-emu#334 with the casting moved from the output of
min to it's inputs.

This is a non-issue on 64 bit machines, but if dolphin is compiled
on an OS with size_t == u32 (say ARM) then remainingSize could be
truncated.

Restored the casting to the original order before dolphin-emu#334.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants