Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 63efe32

Browse files
committed
Merge pull request #4623 from cgohlke/patch-1
Provide std::isfinite for msvc
2 parents 3829741 + 717ff82 commit 63efe32

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

src/mplutils.h

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,10 @@ const size_t NUM_VERTICES[] = { 1, 1, 1, 2, 3, 1 };
5151

5252
extern "C" int add_dict_int(PyObject *dict, const char *key, long val);
5353

54-
#if defined(_MSC_VER) && (_MSC_VER == 1400)
55-
56-
/* Required by libpng and zlib */
57-
#pragma comment(lib, "bufferoverflowU")
58-
59-
/* std::max and std::min are missing in Windows Server 2003 R2
60-
Platform SDK compiler. See matplotlib bug #3067191 */
61-
namespace std
62-
{
63-
64-
template <class T>
65-
inline T max(const T &a, const T &b)
66-
{
67-
return (a > b) ? a : b;
54+
#if defined(_MSC_VER) && (_MSC_VER < 1800)
55+
namespace std {
56+
inline bool isfinite(double num) { return _finite(num); }
6857
}
69-
70-
template <class T>
71-
inline T min(const T &a, const T &b)
72-
{
73-
return (a < b) ? a : b;
74-
}
75-
}
76-
7758
#endif
7859

7960
#endif

0 commit comments

Comments
 (0)