Fix various casting warnings
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1471 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -90,25 +90,27 @@ float lfoController::value( int _offset )
|
||||
|
||||
// The new duration in frames
|
||||
// (Samples/Second) / (periods/second) = (Samples/cycle)
|
||||
int newDuration = static_cast<int>(
|
||||
(engine::getMixer()->processingSampleRate()) *
|
||||
m_speedModel.value() );
|
||||
float newDurationF =
|
||||
engine::getMixer()->processingSampleRate() *
|
||||
m_speedModel.value();
|
||||
|
||||
switch(m_multiplierModel.value() )
|
||||
{
|
||||
case 1:
|
||||
newDuration /= 100.0;
|
||||
newDurationF /= 100.0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
newDuration *= 100.0;
|
||||
newDurationF *= 100.0;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
m_phaseOffset = m_phaseModel.value() * newDuration / (360.0);
|
||||
m_phaseOffset = static_cast<int>(
|
||||
m_phaseModel.value() * newDurationF / 360.0 );
|
||||
int newDuration = static_cast<int>( newDurationF );
|
||||
|
||||
if (newDuration != m_duration) {
|
||||
// frame offset
|
||||
|
||||
@@ -642,7 +642,7 @@ void automationEditor::leaveEvent( QEvent * _e )
|
||||
|
||||
void automationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
|
||||
{
|
||||
int deltax = tAbs<float>( _x1 - _x0 );
|
||||
int deltax = static_cast<int>( tAbs<float>( _x1 - _x0 ) );
|
||||
float deltay = tAbs<float>( _y1 - _y0 );
|
||||
int x = _x0;
|
||||
float y = _y0;
|
||||
|
||||
@@ -61,9 +61,9 @@ void lmmsStyle::drawPrimitive( PrimitiveElement element,
|
||||
QColor highlight = option->palette.highlight().color();
|
||||
|
||||
int a100 = 165;
|
||||
int a75 = a100 * .75;
|
||||
int a50 = a100 * .6;
|
||||
int a25 = a100 * .33;
|
||||
int a75 = static_cast<int>( a100 * .75 );
|
||||
int a50 = static_cast<int>( a100 * .6 );
|
||||
int a25 = static_cast<int>( a100 * .33 );
|
||||
|
||||
QLine lines[4];
|
||||
QPoint points[4];
|
||||
|
||||
Reference in New Issue
Block a user