From 9d7097177de2c2d9759293f7f75b3582bda3fa22 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 23 Jun 2004 04:49:48 +0000 Subject: [PATCH] remove std_min and std_max, update minmax coding guidelines [SVN r23162] --- include/boost/python/slice.hpp | 6 ++++-- src/object/class.cpp | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/boost/python/slice.hpp b/include/boost/python/slice.hpp index 6c54ad7b..c3b10c59 100644 --- a/include/boost/python/slice.hpp +++ b/include/boost/python/slice.hpp @@ -143,7 +143,8 @@ class slice : public object throw std::invalid_argument( "Zero-length slice"); if (i >= 0) { ret.start = begin; - std::advance( ret.start, std_min(i, max_dist-1)); + BOOST_USING_STD_MIN(); + std::advance( ret.start, min BOOST_PREVENT_MACRO_SUBSTITUTION(i, max_dist-1)); } else { if (i < -max_dist && ret.step < 0) @@ -187,7 +188,8 @@ class slice : public object if (i > 0) { ret.stop = begin; - std::advance( ret.stop, std_min( i-1, max_dist-1)); + BOOST_USING_STD_MIN(); + std::advance( ret.stop, min BOOST_PREVENT_MACRO_SUBSTITUTION( i-1, max_dist-1)); } else { // i is negative, but not more negative than -max_dist ret.stop = end; diff --git a/src/object/class.cpp b/src/object/class.cpp index 0cc1d59e..58a453be 100644 --- a/src/object/class.cpp +++ b/src/object/class.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -482,7 +481,7 @@ namespace objects // Build a tuple of the base Python type objects. If no bases // were declared, we'll use our class_type() as the single base // class. - std::size_t const num_bases = std_max(num_types - 1, static_cast(1)); + std::size_t const num_bases = (std::max)(num_types - 1, static_cast(1)); handle<> bases(PyTuple_New(num_bases)); for (std::size_t i = 1; i <= num_bases; ++i)