D15690: Removed old style casts

Tomaz Canabrava noreply at phabricator.kde.org
Sun Sep 23 06:37:13 BST 2018


tcanabrava added inline comments.

INLINE COMMENTS

> concCalculator.cpp:626
>          volume = massSolute() / densitySolute();
> +        break;
>      default:

This break seems meeded

> spectrumwidget.cpp:219
>      //the total number of tickmarks to draw (small and long)
> -    const int numberOfTickmarks = (int)floor((double)(width() / d));
> +    const int numberOfTickmarks = static_cast <int> (floor(static_cast <double> (width() / d)));
>  

Not everything that had old style casts should have a cast at all

> spectrumwidget.cpp:362
> +        int left = static_cast <int> (Wavelength(static_cast <double> (m_LMBPointPress.x()) / width()));
> +        int right = static_cast <int> (Wavelength(static_cast <double> (e->pos().x()) / width()));
>  

He careful not to make things yet more complex with the casts.

REPOSITORY
  R326 Kalzium

REVISION DETAIL
  https://phabricator.kde.org/D15690

To: carlos_hdc, tcanabrava
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180923/128b9fc7/attachment.html>


More information about the kde-edu mailing list