1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Changed shared_ptr to unique_ptr for Priv storage in fluid::View

This commit is contained in:
Ruslan Garnov
2019-11-13 15:46:52 +03:00
parent 6c93e42d94
commit 65ccafd494
6 changed files with 29 additions and 18 deletions
@@ -85,10 +85,13 @@ public:
Priv& priv(); // internal use only
const Priv& priv() const; // internal use only
View(Priv* p);
View(std::unique_ptr<Priv>&& p);
View(View&& v);
View& operator=(View&& v);
~View();
private:
std::shared_ptr<Priv> m_priv;
std::unique_ptr<Priv> m_priv;
const Cache* m_cache;
};
@@ -139,6 +142,7 @@ public:
inline const GMatDesc& meta() const { return m_cache->m_desc; }
View mkView(int borderSize, bool ownStorage);
void addView(const View* v);
class GAPI_EXPORTS Priv; // internal use only
Priv& priv(); // internal use only
@@ -172,7 +172,7 @@ template<> struct fluid_get_in<cv::GMat>
{
static const cv::gapi::fluid::View& get(const cv::GArgs &in_args, int idx)
{
return in_args[idx].unsafe_get<cv::gapi::fluid::View>();
return *in_args[idx].unsafe_get<cv::gapi::fluid::View*>();
}
};