Skip to content

Commit 1e3cfbc

Browse files
committed
fixes for the warnings.
[SVN r26290]
1 parent 1ed2317 commit 1e3cfbc

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# include <boost/get_pointer.hpp>
1212
# include <boost/detail/binary_search.hpp>
1313
# include <boost/numeric/conversion/cast.hpp>
14-
# include <boost/detail/workaround.hpp>
15-
# include <boost/config.hpp>
1614
# include <vector>
1715
# include <map>
1816
#include <iostream>
@@ -590,17 +588,9 @@ namespace boost { namespace python { namespace detail {
590588
from += max_index;
591589
if (from < 0) // Clip lower bounds to zero
592590
from = 0;
593-
if (from > max_index) // Clip upper bounds to max_index.
594-
from = max_index;
595-
596-
// agurt 21/sep/04: here and below -- MSVC 6.x ICEs in 'vector_indexing_suite.cpp'
597-
// unless we get skip 'boost::numeric_cast' layer and directly invoke the
598-
// underlaying convertor's method
599-
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
600591
from_ = boost::numeric_cast<Index>(from);
601-
#else
602-
from_ = boost::numeric::converter<Index,long>::convert(from);
603-
#endif
592+
if (from_ > max_index) // Clip upper bounds to max_index.
593+
from_ = max_index;
604594
}
605595

606596
if (Py_None == slice->stop) {
@@ -612,14 +602,9 @@ namespace boost { namespace python { namespace detail {
612602
to += max_index;
613603
if (to < 0)
614604
to = 0;
615-
if (to > max_index)
616-
to = max_index;
617-
618-
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
619605
to_ = boost::numeric_cast<Index>(to);
620-
#else
621-
to_ = boost::numeric::converter<Index,long>::convert(to);
622-
#endif
606+
if (to_ > max_index)
607+
to_ = max_index;
623608
}
624609
}
625610

0 commit comments

Comments
 (0)