From 1e3cfbca0392cb73b5fc2963135b67458e39ef9f Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Thu, 25 Nov 2004 09:17:04 +0000 Subject: [PATCH] fixes for the warnings. [SVN r26290] --- .../indexing/detail/indexing_suite_detail.hpp | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp index c8ffe250..34a4096a 100644 --- a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp +++ b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp @@ -11,8 +11,6 @@ # include # include # include -# include -# include # include # include #include @@ -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(from); -#else - from_ = boost::numeric::converter::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(to); -#else - to_ = boost::numeric::converter::convert(to); -#endif + if (to_ > max_index) + to_ = max_index; } }