Mercurial > hg > svgui
comparison layer/WaveformLayer.cpp @ 806:4c8ca536b54f warnfix_no_size_t
Some more unsigned/long removal
author | Chris Cannam |
---|---|
date | Tue, 17 Jun 2014 15:36:56 +0100 |
parents | 1d526ba11a24 |
children | 99f96cacde36 |
comparison
equal
deleted
inserted
replaced
805:1d526ba11a24 | 806:4c8ca536b54f |
---|---|
408 | 408 |
409 bool | 409 bool |
410 WaveformLayer::getSourceFramesForX(View *v, int x, int modelZoomLevel, | 410 WaveformLayer::getSourceFramesForX(View *v, int x, int modelZoomLevel, |
411 int &f0, int &f1) const | 411 int &f0, int &f1) const |
412 { | 412 { |
413 long viewFrame = v->getFrameForX(x); | 413 int viewFrame = v->getFrameForX(x); |
414 if (viewFrame < 0) { | 414 if (viewFrame < 0) { |
415 f0 = 0; | 415 f0 = 0; |
416 f1 = 0; | 416 f1 = 0; |
417 return false; | 417 return false; |
418 } | 418 } |
432 } | 432 } |
433 | 433 |
434 float | 434 float |
435 WaveformLayer::getNormalizeGain(View *v, int channel) const | 435 WaveformLayer::getNormalizeGain(View *v, int channel) const |
436 { | 436 { |
437 long startFrame = v->getStartFrame(); | 437 int startFrame = v->getStartFrame(); |
438 long endFrame = v->getEndFrame(); | 438 int endFrame = v->getEndFrame(); |
439 | 439 |
440 // Although a long for purposes of comparison against the view | 440 int modelStart = m_model->getStartFrame(); |
441 // start and end frames, these are known to be non-negative | 441 int modelEnd = m_model->getEndFrame(); |
442 long modelStart = long(m_model->getStartFrame()); | |
443 long modelEnd = long(m_model->getEndFrame()); | |
444 | 442 |
445 int rangeStart, rangeEnd; | 443 int rangeStart, rangeEnd; |
446 | 444 |
447 if (startFrame < modelStart) rangeStart = modelStart; | 445 if (startFrame < modelStart) rangeStart = modelStart; |
448 else rangeStart = startFrame; | 446 else rangeStart = startFrame; |