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

BUILD: MSVC 2013 needs <algorithm> #21

Closed
darkstar opened this issue Mar 22, 2015 · 3 comments
Closed

BUILD: MSVC 2013 needs <algorithm> #21

darkstar opened this issue Mar 22, 2015 · 3 comments
Labels

Comments

@darkstar
Copy link

MSVC2013 needs include <algorithm> to define std::min and std::max, which is missing in disney.cpp

Here's a diff to make it build

diff --git a/src/hardware/disney.cpp b/src/hardware/disney.cpp
index 9d2418b..81f47ca 100644
--- a/src/hardware/disney.cpp
+++ b/src/hardware/disney.cpp
@@ -18,6 +18,7 @@


 #include <string.h>
+#include <algorithm> // for std::min and std::max
 #include "dosbox.h"
 #include "inout.h"
 #include "mixer.h"

Also, the different uses of min/max could be unified (ide.cpp uses a custom macro MIN and MAX for example, and debug/debug_win32.c also defines its own version of min() ...)

@joncampbell123
Copy link
Owner

Thanks! For some reason GCC did not demand it.

@joncampbell123
Copy link
Owner

Pull the latest commit. Does it work?

@darkstar
Copy link
Author

yup, works

joncampbell123 pushed a commit that referenced this issue Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants