Mercurial > hg > svgui
comparison layer/Layer.cpp @ 1414:fa986b91d77f
Merge from branch fix-static-analysis
author | Chris Cannam |
---|---|
date | Wed, 09 Jan 2019 15:24:51 +0000 |
parents | c8a6fd3f9dff |
children | 62e908518c71 ec6605563544 |
comparison
equal
deleted
inserted
replaced
1413:0930a27ebea2 | 1414:fa986b91d77f |
---|---|
109 // cerr << "Layer (" << this << ", " << objectName() << ")::getPlayParameters: model is "<< getModel() << endl; | 109 // cerr << "Layer (" << this << ", " << objectName() << ")::getPlayParameters: model is "<< getModel() << endl; |
110 const Model *model = getModel(); | 110 const Model *model = getModel(); |
111 if (model) { | 111 if (model) { |
112 return PlayParameterRepository::getInstance()->getPlayParameters(model); | 112 return PlayParameterRepository::getInstance()->getPlayParameters(model); |
113 } | 113 } |
114 return 0; | 114 return nullptr; |
115 } | 115 } |
116 | 116 |
117 void | 117 void |
118 Layer::setLayerDormant(const LayerGeometryProvider *v, bool dormant) | 118 Layer::setLayerDormant(const LayerGeometryProvider *v, bool dormant) |
119 { | 119 { |
167 | 167 |
168 sv_frame_t | 168 sv_frame_t |
169 Layer::alignToReference(LayerGeometryProvider *v, sv_frame_t frame) const | 169 Layer::alignToReference(LayerGeometryProvider *v, sv_frame_t frame) const |
170 { | 170 { |
171 const Model *m = getModel(); | 171 const Model *m = getModel(); |
172 SVDEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl; | 172 SVDEBUG << "Layer::alignToReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : nullptr) << endl; |
173 if (m && m->getAlignmentReference()) { | 173 if (m && m->getAlignmentReference()) { |
174 return m->alignToReference(frame); | 174 return m->alignToReference(frame); |
175 } else { | 175 } else { |
176 return v->getView()->alignToReference(frame); | 176 return v->getView()->alignToReference(frame); |
177 } | 177 } |
179 | 179 |
180 sv_frame_t | 180 sv_frame_t |
181 Layer::alignFromReference(LayerGeometryProvider *v, sv_frame_t frame) const | 181 Layer::alignFromReference(LayerGeometryProvider *v, sv_frame_t frame) const |
182 { | 182 { |
183 const Model *m = getModel(); | 183 const Model *m = getModel(); |
184 SVDEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : 0) << endl; | 184 SVDEBUG << "Layer::alignFromReference(" << frame << "): model = " << m << ", alignment reference = " << (m ? m->getAlignmentReference() : nullptr) << endl; |
185 if (m && m->getAlignmentReference()) { | 185 if (m && m->getAlignmentReference()) { |
186 return m->alignFromReference(frame); | 186 return m->alignFromReference(frame); |
187 } else { | 187 } else { |
188 return v->getView()->alignFromReference(frame); | 188 return v->getView()->alignFromReference(frame); |
189 } | 189 } |