From 8a689238b835031419bc922aaeed2789673f7f70 Mon Sep 17 00:00:00 2001 From: Osyotr Date: Tue, 22 Apr 2025 17:48:19 +0300 Subject: [PATCH] Fix warning C4456: declaration of 'storage' hides previous local declaration This is a copy-paste issue introduced in https://github.com/boostorg/python/commit/aca3c80c4f80dd3d52219e1ee299e08bb980bcfd --- .../python/converter/shared_ptr_from_python.hpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/boost/python/converter/shared_ptr_from_python.hpp b/include/boost/python/converter/shared_ptr_from_python.hpp index b5c62ba94..8ce5a8b85 100644 --- a/include/boost/python/converter/shared_ptr_from_python.hpp +++ b/include/boost/python/converter/shared_ptr_from_python.hpp @@ -49,16 +49,9 @@ struct shared_ptr_from_python new (storage) SP(); else { - void *const storage = ((converter::rvalue_from_python_storage >*)data)->storage.bytes; - // Deal with the "None" case. - if (data->convertible == source) - new (storage) SP(); - else - { - SP hold_convertible_ref_count((void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); - // use aliasing constructor - new (storage) SP(hold_convertible_ref_count, static_cast(data->convertible)); - } + SP hold_convertible_ref_count((void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); + // use aliasing constructor + new (storage) SP(hold_convertible_ref_count, static_cast(data->convertible)); } data->convertible = storage; }