2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

fixes for the warnings.

[SVN r26290]
This commit is contained in:
Joel de Guzman
2004-11-25 09:17:04 +00:00
parent 1ed231747b
commit 1e3cfbca03

View File

@@ -11,8 +11,6 @@
# include <boost/get_pointer.hpp>
# include <boost/detail/binary_search.hpp>
# include <boost/numeric/conversion/cast.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/config.hpp>
# include <vector>
# include <map>
#include <iostream>
@@ -590,17 +588,9 @@ namespace boost { namespace python { namespace detail {
from += max_index;
if (from < 0) // Clip lower bounds to zero
from = 0;
if (from > max_index) // Clip upper bounds to max_index.
from = max_index;
// agurt 21/sep/04: here and below -- MSVC 6.x ICEs in 'vector_indexing_suite.cpp'
// unless we get skip 'boost::numeric_cast' layer and directly invoke the
// underlaying convertor's method
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
from_ = boost::numeric_cast<Index>(from);
#else
from_ = boost::numeric::converter<Index,long>::convert(from);
#endif
if (from_ > max_index) // Clip upper bounds to max_index.
from_ = max_index;
}
if (Py_None == slice->stop) {
@@ -612,14 +602,9 @@ namespace boost { namespace python { namespace detail {
to += max_index;
if (to < 0)
to = 0;
if (to > max_index)
to = max_index;
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
to_ = boost::numeric_cast<Index>(to);
#else
to_ = boost::numeric::converter<Index,long>::convert(to);
#endif
if (to_ > max_index)
to_ = max_index;
}
}