Skip to content

Commit ee6c4c3

Browse files
committed
avoid boost compiler warnings
1 parent 80524fd commit ee6c4c3

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

boost/boost/python/converter/shared_ptr_from_python.hpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,9 @@ struct shared_ptr_from_python
4949
new (storage) SP<T>();
5050
else
5151
{
52-
void *const storage = ((converter::rvalue_from_python_storage<SP<T> >*)data)->storage.bytes;
53-
// Deal with the "None" case.
54-
if (data->convertible == source)
55-
new (storage) SP<T>();
56-
else
57-
{
58-
SP<void> hold_convertible_ref_count((void*)0, shared_ptr_deleter(handle<>(borrowed(source))) );
59-
// use aliasing constructor
60-
new (storage) SP<T>(hold_convertible_ref_count, static_cast<T*>(data->convertible));
61-
}
52+
SP<void> hold_convertible_ref_count((void*)0, shared_ptr_deleter(handle<>(borrowed(source))) );
53+
// use aliasing constructor
54+
new (storage) SP<T>(hold_convertible_ref_count, static_cast<T*>(data->convertible));
6255
}
6356
data->convertible = storage;
6457
}

boost/boost/python/object_call.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a)) const
1616
{
1717
typedef typename detail::dependent<object, A0>::type obj;
18-
U const& self = *static_cast<U const*>(this);
19-
return call<obj>(get_managed_object(self, tag), BOOST_PP_ENUM_PARAMS_Z(1, N, a));
18+
U const& self_local = *static_cast<U const*>(this);
19+
return call<obj>(get_managed_object(self_local, tag), BOOST_PP_ENUM_PARAMS_Z(1, N, a));
2020
}
2121

2222
# undef N

boost/boost/python/raw_function.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ object raw_function(F f, std::size_t min_args = 0)
5050
objects::py_function(
5151
detail::raw_dispatcher<F>(f)
5252
, mpl::vector1<PyObject*>()
53-
, min_args
53+
, static_cast<int>(min_args)
5454
, (std::numeric_limits<unsigned>::max)()
5555
)
5656
);

0 commit comments

Comments
 (0)