From ec5065eb53405c490f17c39f6507fde9e5f70a88 Mon Sep 17 00:00:00 2001 From: Anastasiya Pronina Date: Fri, 6 Nov 2020 14:54:23 +0300 Subject: [PATCH] Fixed Inputs/OutputsDataMap conversion --- modules/gapi/src/backends/ie/giebackend/giewrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gapi/src/backends/ie/giebackend/giewrapper.cpp b/modules/gapi/src/backends/ie/giebackend/giewrapper.cpp index 8f5a7eca11..ba0632d4f0 100644 --- a/modules/gapi/src/backends/ie/giebackend/giewrapper.cpp +++ b/modules/gapi/src/backends/ie/giebackend/giewrapper.cpp @@ -25,7 +25,7 @@ using GIEParam = cv::gapi::ie::detail::ParamDesc; IE::InputsDataMap giewrap::toInputsDataMap (const IE::ConstInputsDataMap& inputs) { IE::InputsDataMap transformed; auto convert = [](const std::pair& p) { - return std::make_pair(p.first, std::make_shared(*p.second)); + return std::make_pair(p.first, std::const_pointer_cast(p.second)); }; std::transform(inputs.begin(), inputs.end(), std::inserter(transformed, transformed.end()), convert); return transformed; @@ -34,7 +34,7 @@ IE::InputsDataMap giewrap::toInputsDataMap (const IE::ConstInputsDataMap& inputs IE::OutputsDataMap giewrap::toOutputsDataMap (const IE::ConstOutputsDataMap& outputs) { IE::OutputsDataMap transformed; auto convert = [](const std::pair& p) { - return std::make_pair(p.first, std::make_shared(*p.second)); + return std::make_pair(p.first, std::const_pointer_cast(p.second)); }; std::transform(outputs.begin(), outputs.end(), std::inserter(transformed, transformed.end()), convert); return transformed;