Replaced calls to Ptr<T>::ptr to ::dynamicCast.

pull/1281/head
Roman Donchenko 11 years ago
parent 24dee16b12
commit 3e189a2b41
  1. 4
      modules/core/include/opencv2/core/operations.hpp

@ -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…
Cancel
Save