mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
Replaced calls to Ptr<T>::ptr to ::dynamicCast.
This commit is contained in:
parent
24dee16b12
commit
3e189a2b41
@ -445,13 +445,13 @@ int print(const Matx<_Tp, m, n>& matx, FILE* stream = stdout)
|
|||||||
template<typename _Tp> inline
|
template<typename _Tp> inline
|
||||||
Ptr<_Tp> Algorithm::create(const String& name)
|
Ptr<_Tp> Algorithm::create(const String& name)
|
||||||
{
|
{
|
||||||
return _create(name).ptr<_Tp>();
|
return _create(name).dynamicCast<_Tp>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename _Tp> inline
|
template<typename _Tp> inline
|
||||||
void Algorithm::set(const char* _name, const Ptr<_Tp>& value)
|
void Algorithm::set(const char* _name, const Ptr<_Tp>& value)
|
||||||
{
|
{
|
||||||
Ptr<Algorithm> algo_ptr = value. template ptr<cv::Algorithm>();
|
Ptr<Algorithm> algo_ptr = value. template dynamicCast<cv::Algorithm>();
|
||||||
if (!algo_ptr) {
|
if (!algo_ptr) {
|
||||||
CV_Error( Error::StsUnsupportedFormat, "unknown/unsupported Ptr type of the second parameter of the method Algorithm::set");
|
CV_Error( Error::StsUnsupportedFormat, "unknown/unsupported Ptr type of the second parameter of the method Algorithm::set");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user