Skip to content

Commit b37fefd

Browse files
committed
Bug #
svn path=/branches/v1_0_maint/; revision=8714
1 parent 7e5f7d3 commit b37fefd

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

lib/matplotlib/tri/_tri.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,10 @@ void TriContourGenerator::clear_visited_flags(bool include_boundaries)
559559
// Clear _boundaries_visited.
560560
for (BoundariesVisited::iterator it = _boundaries_visited.begin();
561561
it != _boundaries_visited.end(); ++it)
562-
fill(it->begin(), it->end(), false);
562+
std::fill(it->begin(), it->end(), false);
563563

564564
// Clear _boundaries_used.
565-
fill(_boundaries_used.begin(), _boundaries_used.end(), false);
565+
std::fill(_boundaries_used.begin(), _boundaries_used.end(), false);
566566
}
567567
}
568568

src/mplutils.h

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* mplutils.h --
1+
/* mplutils.h --
22
*
33
* $Header$
44
* $Log$
@@ -20,7 +20,7 @@
2020
void _VERBOSE(const std::string&);
2121

2222

23-
#undef CLAMP
23+
#undef CLAMP
2424
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
2525

2626
#undef MAX
@@ -45,4 +45,27 @@ public :
4545
friend std::ostream &operator <<(std::ostream &, const Printf &);
4646
};
4747

48+
#if defined(_MSC_VER) && (_MSC_VER == 1400)
49+
50+
/* Required by libpng and zlib */
51+
#pragma comment(lib, "bufferoverflowU")
52+
53+
/* std::max and std::min are missing in Windows Server 2003 R2
54+
Platform SDK compiler. See matplotlib bug #3067191 */
55+
namespace std {
56+
57+
template <class T> inline T max(const T& a, const T& b)
58+
{
59+
return (a > b) ? a : b;
60+
}
61+
62+
template <class T> inline T min(const T& a, const T& b)
63+
{
64+
return (a < b) ? a : b;
65+
}
66+
67+
}
68+
69+
#endif
70+
4871
#endif

0 commit comments

Comments
 (0)