Boring changes - core.

This and several following commits contain the "boring" changes required
to support the new Ptr. These are changes like:

* new T -> makePtr<T> or .reset(new T) or Ptr<T>(new T)
  (depending on the situation)
* p.empty() -> !p
* delete_obj -> DefaultDeleter::operator()

and similar changes that are numerous, but primitive.
This commit is contained in:
Roman Donchenko
2013-08-13 16:22:07 +04:00
parent 461c98fa86
commit 8200a95ced
14 changed files with 58 additions and 87 deletions

View File

@@ -270,16 +270,16 @@ protected:
cvRelease((void**)&m_nd);
Ptr<CvSparseMat> m_s = (CvSparseMat*)fs["test_sparse_mat"].readObj();
Ptr<CvSparseMat> _test_sparse_ = cvCreateSparseMat(test_sparse_mat);
Ptr<CvSparseMat> _test_sparse = (CvSparseMat*)cvClone(_test_sparse_);
Ptr<CvSparseMat> m_s((CvSparseMat*)fs["test_sparse_mat"].readObj());
Ptr<CvSparseMat> _test_sparse_(cvCreateSparseMat(test_sparse_mat));
Ptr<CvSparseMat> _test_sparse((CvSparseMat*)cvClone(_test_sparse_));
SparseMat m_s2;
fs["test_sparse_mat"] >> m_s2;
Ptr<CvSparseMat> _m_s2 = cvCreateSparseMat(m_s2);
Ptr<CvSparseMat> _m_s2(cvCreateSparseMat(m_s2));
if( !m_s || !CV_IS_SPARSE_MAT(m_s) ||
!cvTsCheckSparse(m_s, _test_sparse,0) ||
!cvTsCheckSparse(_m_s2, _test_sparse,0))
!cvTsCheckSparse(m_s, _test_sparse, 0) ||
!cvTsCheckSparse(_m_s2, _test_sparse, 0))
{
ts->printf( cvtest::TS::LOG, "the read sparse matrix is not correct\n" );
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_OUTPUT );