Author: mordante
Date: Wed Aug 20 07:13:45 2008
New Revision: 28782
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28782&view=rev
Log:
Now that MSVC 6 is no longer supported start to remove some helper code to work
around problems in that compiler. The first step is to comment out the code and
replace it with new helper code that uses the standard. The second step is to
remove the helper code and fix all callers.
Patch 2/3 for step 1: Use std::min and std::max.
Modified:
trunk/src/util.hpp
Modified: trunk/src/util.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/util.hpp?rev=28782&r1=28781&r2=28782&view=diff
==============================================================================
--- trunk/src/util.hpp (original)
+++ trunk/src/util.hpp Wed Aug 20 07:13:45 2008
@@ -26,6 +26,7 @@
#include <map>
#include <sstream>
+#if 0
// instead of playing with VC++'s crazy definitions of min and max,
// just define our own
/** Replacement for VC++'s definitions of min and max. */
@@ -40,6 +41,16 @@
template<typename T>
inline const T& maximum(const T& a, const T& b) { return a < b ? b : a; }
+
+#else
+
+template<typename T>
+inline const T& minimum(const T& a, const T& b) { return std::min<T>(a, b); }
+
+template<typename T>
+inline const T& maximum(const T& a, const T& b) { return std::max<T>(a, b); }
+
+#endif
template<typename T>
inline bool is_odd(T num) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits