changeset 662:6502c33b1cb1

* minor tidy
author Chris Cannam
date Sun, 24 Oct 2010 22:10:44 +0200
parents 29efe322ab47
children badbbf0921fa
files data/model/AlignmentModel.cpp
diffstat 1 files changed, 7 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/data/model/AlignmentModel.cpp	Mon Oct 18 12:42:42 2010 +0100
+++ b/data/model/AlignmentModel.cpp	Sun Oct 24 22:10:44 2010 +0200
@@ -250,15 +250,6 @@
 AlignmentModel::constructReversePath() const
 {
     if (!m_reversePath) {
-/*!!!
-        if (!m_rawPath) {
-            std::cerr << "ERROR: AlignmentModel::constructReversePath: "
-                      << "No raw path available" << std::endl;
-            return;
-        }
-        m_reversePath = new PathModel
-            (m_rawPath->getSampleRate(), m_rawPath->getResolution(), false);
-*/
         if (!m_path) {
             std::cerr << "ERROR: AlignmentModel::constructReversePath: "
                       << "No forward path available" << std::endl;
@@ -267,24 +258,10 @@
         m_reversePath = new PathModel
             (m_path->getSampleRate(), m_path->getResolution(), false);
     } else {
-/*!!!
-        if (!m_rawPath) return;
-*/
         if (!m_path) return;
     }
         
     m_reversePath->clear();
-/*!!!
-    SparseTimeValueModel::PointList points = m_rawPath->getPoints();
-        
-    for (SparseTimeValueModel::PointList::const_iterator i = points.begin();
-         i != points.end(); ++i) {
-        long frame = i->frame;
-        float value = i->value;
-        long rframe = lrintf(value * m_aligned->getSampleRate());
-        m_reversePath->addPoint(PathPoint(rframe, frame));
-    }
-*/
 
     PathModel::PointList points = m_path->getPoints();
         
@@ -375,7 +352,14 @@
     if (m_path) m_path->aboutToDelete();
     delete m_path;
     m_path = path;
+#ifdef DEBUG_ALIGNMENT_MODEL
+    std::cerr << "AlignmentModel::setPath: path = " << m_path << std::endl;
+#endif
     constructReversePath();
+#ifdef DEBUG_ALIGNMENT_MODEL
+    std::cerr << "AlignmentModel::setPath: after construction path = "
+              << m_path << ", rpath = " << m_reversePath << std::endl;
+#endif
 }
     
 void