mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 05:42:30 +00:00
remove std_min and std_max, update minmax coding guidelines
[SVN r23162]
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <boost/python/self.hpp>
|
||||
#include <boost/python/dict.hpp>
|
||||
#include <boost/python/str.hpp>
|
||||
#include <boost/minmax.hpp>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
@@ -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<std::size_t>(1));
|
||||
std::size_t const num_bases = (std::max)(num_types - 1, static_cast<std::size_t>(1));
|
||||
handle<> bases(PyTuple_New(num_bases));
|
||||
|
||||
for (std::size_t i = 1; i <= num_bases; ++i)
|
||||
|
||||
Reference in New Issue
Block a user