mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fixed standalone build, added cv::gapi::proto::ptr test
This commit is contained in:
@@ -115,6 +115,7 @@ namespace detail
|
||||
virtual ~BasicVectorRef() {}
|
||||
|
||||
virtual void mov(BasicVectorRef &ref) = 0;
|
||||
virtual const void* ptr() const = 0;
|
||||
};
|
||||
|
||||
template<typename T> class VectorRefT final: public BasicVectorRef
|
||||
@@ -207,6 +208,8 @@ namespace detail
|
||||
GAPI_Assert(tv != nullptr);
|
||||
wref() = std::move(tv->wref());
|
||||
}
|
||||
|
||||
virtual const void* ptr() const override { return &rref(); }
|
||||
};
|
||||
|
||||
// This class strips type information from VectorRefT<> and makes it usable
|
||||
@@ -263,7 +266,7 @@ namespace detail
|
||||
}
|
||||
|
||||
// May be used to uniquely identify this object internally
|
||||
const void *ptr() const { return static_cast<const void*>(m_ref.get()); }
|
||||
const void *ptr() const { return m_ref->ptr(); }
|
||||
};
|
||||
|
||||
// Helper (FIXME: work-around?)
|
||||
|
||||
@@ -106,6 +106,7 @@ namespace detail
|
||||
virtual ~BasicOpaqueRef() {}
|
||||
|
||||
virtual void mov(BasicOpaqueRef &ref) = 0;
|
||||
virtual const void* ptr() const = 0;
|
||||
};
|
||||
|
||||
template<typename T> class OpaqueRefT final: public BasicOpaqueRef
|
||||
@@ -197,6 +198,8 @@ namespace detail
|
||||
GAPI_Assert(tv != nullptr);
|
||||
wref() = std::move(tv->wref());
|
||||
}
|
||||
|
||||
virtual const void* ptr() const override { return &rref(); }
|
||||
};
|
||||
|
||||
// This class strips type information from OpaqueRefT<> and makes it usable
|
||||
@@ -251,7 +254,7 @@ namespace detail
|
||||
}
|
||||
|
||||
// May be used to uniquely identify this object internally
|
||||
const void *ptr() const { return static_cast<const void*>(m_ref.get()); }
|
||||
const void *ptr() const { return m_ref->ptr(); }
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user