mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +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
|
||||
Ptr<_Tp> Algorithm::create(const String& name)
|
||||
{
|
||||
return _create(name).ptr<_Tp>();
|
||||
return _create(name).dynamicCast<_Tp>();
|
||||
}
|
||||
|
||||
template<typename _Tp> inline
|
||||
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) {
|
||||
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