Mercurial > hg > svcore
diff data/model/Model.cpp @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 4a2c150ecd67 |
children | 368449629a30 |
line wrap: on
line diff
--- a/data/model/Model.cpp Tue Mar 03 09:33:59 2015 +0000 +++ b/data/model/Model.cpp Tue Mar 03 15:18:24 2015 +0000 @@ -110,30 +110,30 @@ return m_alignment->getReferenceModel(); } -int -Model::alignToReference(int frame) const +sv_frame_t +Model::alignToReference(sv_frame_t frame) const { // cerr << "Model(" << this << ")::alignToReference(" << frame << ")" << endl; if (!m_alignment) { if (m_sourceModel) return m_sourceModel->alignToReference(frame); else return frame; } - int refFrame = m_alignment->toReference(frame); + sv_frame_t refFrame = m_alignment->toReference(frame); const Model *m = m_alignment->getReferenceModel(); if (m && refFrame > m->getEndFrame()) refFrame = m->getEndFrame(); // cerr << "have alignment, aligned is " << refFrame << endl; return refFrame; } -int -Model::alignFromReference(int refFrame) const +sv_frame_t +Model::alignFromReference(sv_frame_t refFrame) const { // cerr << "Model(" << this << ")::alignFromReference(" << refFrame << ")" << endl; if (!m_alignment) { if (m_sourceModel) return m_sourceModel->alignFromReference(refFrame); else return refFrame; } - int frame = m_alignment->fromReference(refFrame); + sv_frame_t frame = m_alignment->fromReference(refFrame); if (frame > getEndFrame()) frame = getEndFrame(); // cerr << "have alignment, aligned is " << frame << endl; return frame;