From cbe6de2a2ddc20b45eae6eb07445178d43553403 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 28 Jul 2004 01:45:50 +0000 Subject: [PATCH] fixes to avoid EDG 245 warnings (by Jonathan Brandmeyer) [SVN r24130] --- .../indexing/detail/indexing_suite_detail.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 a04d0c41..ff9ad9f0 100644 --- a/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp +++ b/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp @@ -11,6 +11,7 @@ # include # include # include +# include # include # include #include @@ -569,7 +570,7 @@ namespace boost { namespace python { namespace detail { static void base_get_slice_data( - Container& container, PySliceObject* slice, Index& from, Index& to) + Container& container, PySliceObject* slice, Index& from_, Index& to_) { if (Py_None != slice->step) { PyErr_SetString( PyExc_IndexError, "slice step size not supported."); @@ -579,34 +580,33 @@ namespace boost { namespace python { namespace detail { Index min_index = DerivedPolicies::get_min_index(container); Index max_index = DerivedPolicies::get_max_index(container); - if (Py_None == slice->start) { - from = min_index; + from_ = min_index; } else { - from = extract( slice->start); + long from = extract( slice->start); if (from < 0) // Negative slice index 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; - + from_ = boost::numeric_cast(from); } if (Py_None == slice->stop) { - to = DerivedPolicies::get_max_index(container); + to_ = max_index; } else { - to = extract( slice->stop); + long to = extract( slice->stop); if (to < 0) to += max_index; if (to < 0) to = 0; if (to > max_index) to = max_index; + to_ = boost::numeric_cast(to); } - } static void