diff options
author | Zaba999 <zaba.marcin@gmail.com> | 2012-09-18 00:01:00 +0200 |
---|---|---|
committer | Zaba999 <zaba.marcin@gmail.com> | 2012-09-18 00:01:00 +0200 |
commit | a397922e8d53c6f7ff469d38e5139fd003c705b5 (patch) | |
tree | 8f6e92a0ac59d655e5fcc48bd198aa1bae25f0db /src/ui/list.cpp | |
parent | 844e11db4f394004258cdca8f8fd8bc95c41a985 (diff) | |
download | colobot-a397922e8d53c6f7ff469d38e5139fd003c705b5.tar.gz colobot-a397922e8d53c6f7ff469d38e5139fd003c705b5.tar.bz2 colobot-a397922e8d53c6f7ff469d38e5139fd003c705b5.zip |
warnings fight in progress.
Diffstat (limited to 'src/ui/list.cpp')
-rw-r--r-- | src/ui/list.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/list.cpp b/src/ui/list.cpp index 80609d7..2aeb240 100644 --- a/src/ui/list.cpp +++ b/src/ui/list.cpp @@ -759,16 +759,16 @@ void CList::UpdateScroll() value = 0.0f; step = 0.0f; } else { - ratio = (float)m_displayLine / m_totalLine; + ratio = static_cast<float>m_displayLine / m_totalLine; if ( ratio > 1.0f ) ratio = 1.0f; - value = (float)m_firstLine / (m_totalLine - m_displayLine); + value = static_cast<float>m_firstLine / (m_totalLine - m_displayLine); if ( value < 0.0f ) value = 0.0f; if ( value > 1.0f ) value = 1.0f; - step = (float)1.0f/ (m_totalLine - m_displayLine); + step = static_cast<float>1.0f/ (m_totalLine - m_displayLine); if ( step < 0.0f ) step = 0.0f; } @@ -791,7 +791,7 @@ void CList::MoveScroll() n = m_totalLine - m_displayLine; pos = m_scroll->GetVisibleValue(); pos += m_scroll->GetArrowStep() / 2.0f; // it's magic! - m_firstLine = (int)(pos * n); + m_firstLine = static_cast<int>(pos * n); if ( m_firstLine < 0 ) m_firstLine = 0; if ( m_firstLine > n ) |